from dj_rest_auth.registration.views import VerifyEmailView, ConfirmEmailView from dj_rest_auth.views import PasswordResetConfirmView from django.urls import path, include from .views import email_verified, GetUserView urlpatterns = [ path('auth/password/reset/confirm/<slug:uidb64>/<slug:token>/', PasswordResetConfirmView.as_view(), name='password_reset_confirm'), path('auth/registration/account-confirm-email/<str:key>/', ConfirmEmailView.as_view()), path('auth/', include('dj_rest_auth.urls')), path('auth/registration/', include('dj_rest_auth.registration.urls')), path('auth/account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent'), path('email-verified', email_verified), path('user/<int:pk>', GetUserView.as_view()), ]
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 import permissions from dj_rest_auth.registration.views import VerifyEmailView, ConfirmEmailView from dj_rest_auth.views import PasswordResetConfirmView from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('api.urls')), path('api/dj-rest-auth/registration/account-confirm-email/<str:key>/',ConfirmEmailView.as_view()), # Needs to be defined before the registration path path('api/dj-rest-auth/registration/', include('dj_rest_auth.registration.urls')), path('api/dj-rest-auth/account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent'), path('api/dj-rest-auth/',include(('dj_rest_auth.urls', 'dj-rest-auth'), namespace='dj-rest-auth' )), path('api/dj-rest-auth/password/reset/confirm/<slug:uidb64>/<slug:token>/',PasswordResetConfirmView.as_view(), name='password_reset_confirm'), path('api/schema/', SpectacularAPIView.as_view(), name='schema'), path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'), path('api/schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'), ]
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static from dj_rest_auth.registration.views import VerifyEmailView, ConfirmEmailView from dj_rest_auth.views import PasswordResetConfirmView from users.views import FacebookLogin urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls'), name='socialaccount_signup'), path('rest-auth/', include('dj_rest_auth.urls')), path('rest-auth/registration/account-confirm-email/<str:key>/', ConfirmEmailView.as_view()), path('rest-auth/registration/', include('dj_rest_auth.registration.urls')), path('rest-auth/account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent'), path('rest-auth/password/reset/confirm/<slug:uidb64>/<slug:token>/', PasswordResetConfirmView.as_view(), name='password_reset_confirm'), path('rest-auth/facebook/', FacebookLogin.as_view(), name='fb_login'), path('api/items/', include('items.urls')), path('api/users/', include('users.urls')), path('djrichtextfield/', include('djrichtextfield.urls')) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path, re_path from dj_rest_auth.registration.views import RegisterView, VerifyEmailView, ConfirmEmailView from dj_rest_auth.views import LoginView, LogoutView urlpatterns = [ path('register/', RegisterView.as_view()), path('login/', LoginView.as_view()), path('logout/', LogoutView.as_view()), path('verify-email/', VerifyEmailView.as_view(), name='rest_verify_email'), path('account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent'), re_path(r'^account-confirm-email/(?P<key>[-:\w]+)/$', VerifyEmailView.as_view(), name='account_confirm_email'), path('account-confirm-email/<str:key>/', ConfirmEmailView.as_view()), ]