NoReverseMatch at /verification/user/verify-email

Hi, so i have been using this amazing third party app and everything works fine but when i click on my email verification Link I get this error.

NoReverseMatch at /verification/user/verify-email

3rd Party App: Django-Verify-Email · PyPI

My error Image: https://i.postimg.cc/pVKpDqCN/noreveerse.png

This library assumes you’ve set an /accounts/login/ url.

How do you implemented the Login views and urls in your project?

PD: When posting code or errors, try to do it in a text format instead of an image. That way it will be easier for everyone to read. Thanks!

Hi this is what i Did and it worked
My project Urls File

`from django.contrib import admin`

`from django.urls import path, include`

`from django.contrib.auth import views as auth_views`

`urlpatterns = [`

`path('admin/', admin.site.urls),`

`path('', include('blog.urls')),`

`path('login/', auth_views.LoginView.as_view(template_name='blog/login.html'), name='login'),`

`path('logout/', auth_views.LogoutView.as_view(template_name='blog/logout.html'), name='logout'),`

`path('verification/', include('verify_email.urls')),`

`]`

My settings.py File

LOGIN_URL = ‘login’

Thanks everything works Perfect :slight_smile:

EDIT 2: oh just one more thing when i click the verification link again. it says verification failed as i think it can only validate once the link is pressed and not again which is fine.

but what if it expires how can i resend the user activation link ? (if the user forgot to click the link within 24 hrs)

The library readme says If the token is alredy been redeemed or modified, you’ll be redirected to a verification failed page., so that’s the expected behaviour.

The user should try to log in again so a new verification link is sent.

1 Like

thanks will try it out :slight_smile: