The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from rest_framework.authtoken import views from api.views import Login, Logout urlpatterns = [ path('admin/', admin.site.urls), # Parte de la ruta para los métodos de la api (versión 1) path('api/v1/', include(('api.urls', 'api'))), # Endpoint para obtener el token del usuario según unas credenciales. path('generate_token/', views.obtain_auth_token), # Interfaz de prueba para logarse visualmente y no mediante el endpoint de generate_token path('login/', Login.as_view(), name='Login'), # Endpoint para destruir el token de identificación del usuario y así deslogarse. path('logout/', Logout.as_view(), name='Logout'), ]
from django.urls import path, include from rest_framework.routers import DefaultRouter from rest_framework import urls as rest_urls from api.views import WorkWithProductSet, Login, WorkWithUserSet router = DefaultRouter() router.register('products', WorkWithProductSet) router.register('users', WorkWithUserSet) urlpatterns = router.get_urls() urlpatterns += path('auth/login', Login.as_view()),
from django.contrib import admin from django.urls import path from django.conf.urls import include from rest_framework.authtoken.views import obtain_auth_token from api.views import Login, send_email, send_array urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('api.urls')), path('auth/', obtain_auth_token), path('login/', Login.as_view()), path('send_email/', send_email), path('send_array/', send_array), ]
from django.conf.urls import url from api.views import Join, Login, Logout, Detail, Update urlpatterns = [ url(r'^user/join/', Join.as_view()), url(r'^user/login/', Login.as_view()), url(r'^user/logout/', Logout.as_view()), url(r'^user/detail/', Detail.as_view()), url(r'^user/update/(?P<type>.+)', Update.as_view()), ]
"""jwttest URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from rest_framework.authtoken import views from api.views import Login urlpatterns = [ path('admin/', admin.site.urls), path('api/1.0/', include('api.urls')), path( 'admin/get_tok', views.obtain_auth_token ), ### crea un vista que envia mediante post un token la vista debe llamarse asi views.obtain_auth_token path('login', Login.as_view(), name='login') ]
from django.contrib import admin from django.conf.urls import url, include from rest_framework.routers import DefaultRouter from api.views import LoginOTPView, RegisterOTPView, SubscribeView, CustomerQueryView, Login, \ StateViewSet, CityViewSet, PincodeViewSet router = DefaultRouter() urlpatterns = [ url(r'^login_otp/', LoginOTPView.as_view(), name='commom_otp'), url(r'^register_otp/', RegisterOTPView.as_view(), name='commom_otp'), url(r'^subscribe/', SubscribeView.as_view(), name='subscribe_news_letter'), url(r'^customer_query/', CustomerQueryView.as_view(), name='customer_query'), url(r'^login/', Login.as_view(), name='login'), ] router.register(r'state', StateViewSet) router.register(r'city', CityViewSet) router.register(r'pincode', PincodeViewSet) urlpatterns += router.urls
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ from django.conf.urls import url from django.contrib.auth import views as auth_views from api.views import Login, Register app_name = "api" urlpatterns = [ url(r'^user/login/', Login.as_view()), url(r'^user/register/', Register.as_view()), ] urlpatterns += [ url(r'^password_reset/$', auth_views.password_reset, name='password_reset'), url(r'^password_reset/done/$', auth_views.password_reset_done, name='password_reset_done'), url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', auth_views.password_reset_confirm, name='password_reset_confirm'), url(r'^reset/done/$', auth_views.password_reset_complete, name='password_reset_complete'),
from django.conf.urls import url from api.views import Login, StudentListAPI, AttendanceCreateAPI, CardRegisterAPI, CardDetailAPI, PhoneRegisterAPI from rest_framework.authtoken.views import obtain_auth_token urlpatterns = [ url(r'^token-auth/', obtain_auth_token), url(r'^login$', Login.as_view()), url(r'^students', StudentListAPI.as_view()), url(r'^attendance-create', AttendanceCreateAPI.as_view()), url(r'^card-register', CardRegisterAPI.as_view()), url(r'^card-detail', CardDetailAPI.as_view()), url(r'^phone-register', PhoneRegisterAPI.as_view()) ] # auth token : Token e327d6ecff6814ec6bbe37435e8ef3547b76ccbb # ji-u nfc_id : DBD94755
"""login_rest URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from rest_framework.authtoken import views #El authtoken se agrega en la linea 41 de los settings from api.views import Login, Logout urlpatterns = [ path('admin/', admin.site.urls), path('api/', include(('api.urls', 'api'))), path('api_generate_token/', views.obtain_auth_token), #Cuando se haga una peticion devolvera un Token para el SUPERUSER correspondiente path('login/', Login.as_view(), name='login'), #Este metodo solo acepta el metodo POST path('logout/', Logout.as_view()), ]
name='political_party_delete'), path('sms/', s_views.sms_list, name=f'sms_list'), path('locality_type/', l_views.locality_type_list, name=f'{l_name}_list'), path('locality_type/create/', l_views.locality_type_create, name=f'{l_name}_create'), path('locality_type/update/<int:pk>/', l_views.locality_type_update, name=f'{l_name}_update'), path('locality_type/delete/<int:pk>/', l_views.locality_type_delete, name=f'{l_name}_delete'), path('minute/', views.minute_list, name='minute_list'), path('minute/create/', views.MinuteCreate.as_view(), name='minute_create'), path('minute/update/<int:pk>/', views.MinuteUpdate.as_view(), name='minute_update'), path('minute/delete/<int:pk>/', views.minute_delete, name='minute_delete'), path('minute_detail/<int:pk>/', views.minute_detail, name='minute_detail'), path('api/v1/polling/', PollingList.as_view()), path('api/v1/polling_detail/', PollingDetails.as_view()), path('api/v1/find_minute/', PollingDetail.as_view()), path('api/v1/polling_detail/<int:pk>/', PollingDetails.as_view()), path('api/v1/evote-sms/', inbound_sms, name='inbound_sms'), #path('api/v1/account/', include('allauth.urls')), path('api/v1/login/', Login.as_view(), name='api_token_auth'), #url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), ] urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.contrib import admin from django.urls import path, include from rest_framework.authtoken import views from api.views import Login, Logout from api.views import Homepage urlpatterns = [ #Rutas de API'S path('api/', include(('api.urls', 'api'))), path('api_generate_token/', views.obtain_auth_token), #Ruta para el administrador DJANGO path('admin/', admin.site.urls), #Url's para pagina de Inicio path('homepage/', Homepage.as_view(), name='homepage'), #Vistas con Templates path('producto/', include('apps.producto.urls', namespace='producto')), path('venta/', include('apps.venta.urls', namespace='venta')), #Rutas para Ingreso, Registro y salida #Pagina de inicio: http://127.0.0.1:8000/accounts/login/ path('accounts/login/', Login.as_view(), name='login'), path('logout/', Logout.as_view(), name='logout'), path('registro/', include(('api.urls', 'registro'))), ]