Open jslovern391 opened 1 year ago
Yes, I recently started maintaining this project again. What issue do you have?
When using this it marks the user as active, but that is the page it goes to afterward.
\Python\Python311\Lib\site-packages\verify_email\views.py, line 58, in verify_user_and_activate
'link': reverse(login_page) ^^^^^^^^^^^^^^^^^^^
By the way, this is a really nice app
I'm sorry but I don't understand the issue, could you be more specific?
When the user clicks the verification link, that is the page that displays. I am assuming it should be the successful page.
I'm guessing it might be a conflict with the app verify_email
, can you share your urls configuration?
Yes when I get home tonight
I sent a verification email and then redirected to http://127.0.0.1:8000/accounts/login/. The user is created and is set to inactive. When the user clicks the verification email they are marked active and this page is shown to them.
Reverse for '/accounts/login/' not found. '/accounts/login/' is not a valid view function or pattern name.Request Method: | GET -- | -- http://127.0.0.1:8000/verification/user/verify-email/anNsb3Zlcm5AZ21haWwuY29t/YnR3YWd4LWQ2ZGEwNGY4YWRkYzY4MDljNmIxMjE4NDEwZTE5NTMzOjFxY1JjbjpIcWRXNzFwclEwUW1fNnB3NE5MTUdsTmVsNFBQcmVmZjg4bnhkdFdYQmtF/ 4.2.4 NoReverseMatch Reverse for '/accounts/login/' not found. '/accounts/login/' is not a valid view function or pattern name. C:\Users\rtbr1\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\resolvers.py, line 828, in _reverse_with_prefix verify_email.views.verify_user_and_activate C:\Users\rtbr1\AppData\Local\Programs\Python\Python311\python.exe 3.11.4 ['D:\\M28t\\Django Project\\m28t', 'C:\\Users\\rtbr1\\AppData\\Local\\Programs\\Python\\Python311\\python311.zip', 'C:\\Users\\rtbr1\\AppData\\Local\\Programs\\Python\\Python311\\DLLs', 'C:\\Users\\rtbr1\\AppData\\Local\\Programs\\Python\\Python311\\Lib', 'C:\\Users\\rtbr1\\AppData\\Local\\Programs\\Python\\Python311', 'C:\\Users\\rtbr1\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages'] Sat, 02 Sep 2023 14:29:43 +0000
C:\Users\rtbr1\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\handlers\exception.py
, line 55, in inner
response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^…
C:\Users\rtbr1\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\handlers\base.py
, line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
C:\Users\rtbr1\AppData\Local\Programs\Python\Python311\Lib\site-packages\verify_email\views.py
, line 58, in verify_user_and_activate
'link': reverse(login_page) ^^^^^^^^^^^^^^^^^^^…
C:\Users\rtbr1\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\base.py
, line 88, in reverse
return resolver._reverse_with_prefix(view, prefix, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
C:\Users\rtbr1\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\resolvers.py
, line 828, in _reverse_with_prefix
raise NoReverseMatch(msg) ^^^^^^^^^^^^^^^^^^^^^^^^^…
#################################################################### INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles',
############################################
'member.apps.MemberConfig',
'verify_email.apps.VerifyEmailConfig',
'crispy_bootstrap4',
'crispy_forms',
urlpatterns = [
path('', views.index, name='index'),
path('member/
views.py def signup(request): if request.method == 'POST': form = MemberForm(request.POST) if form.is_valid(): inactive_user = send_verification_email(request, form) form.cleaned_data['email'] username = form.cleaned_data.get('username') email = form.cleaned_data.get('email') ######################## mail system ####################################
# d = { 'username': username }
# subject, from_email, to = 'welcome', 'messages@dev-m28tmessages.com', email
# html_content = htmly.render(d)
# msg = EmailMultiAlternatives(subject, html_content, from_email, [to])
# msg.attach_alternative(html_content, "text/html")
# msg.send()
##################################################################
messages.success(request, f'Verification email has been sent. Please check spam folder.')
return redirect('login')
else:
form = MemberForm()
return render(request, 'member/signup.html', {'form': form, 'title':'register here'})
Sorry wrong urls.py
urlpatterns = [ path('admin/', admin.site.urls), ####################################### path('', RedirectView.as_view(url='member/signup')), path('member/', include('member.urls')), path('accounts/', include('django.contrib.auth.urls')), path('verification/', include('verify_email.urls')), ]
Ok, I understand better now. A couple of things:
v0.3.1
I was curious if anyone is looking at this because I have an issue.