python - Email verification and password reset - django rest framework and angularjs -


how implement built in views password-reset in django.rest.auth , how create email verification system registration using django rest framework , angularjs?

i have been searching tutorial or documentation on how implement django's send_email function in website using django rest framework , angular js haven't been able find any.

what need...

  • when new user registers url must generated them confirm email address
  • this url must automatically sent user's given email
  • after user sent link , confirms email address status must changed new_user.is_active = false new_user.is_active = true

what have...

  • registration form sends post request register endpoint
    • the new user data unpacked, validated, , saved in register view
  • in settings.py have added this...

    email_use_tls = true  email_host = 'smtp.gmail.com'  email_host_user = 'myemail@gmail.com'  email_host_password = 'mypassword'  email_port = 587 
  • in urls.py have added this...

    from django.conf.urls import url  rest_auth.views import passwordresetview, passwordresetconfirmview  urlpatterns = [    url(r'^password/reset/$', passwordresetview.as_view(), name='password_reset'),    url(r'^password/reset/confirm/$', passwordresetconfirmview.as_view(), name='password_reset_confirm'),  ] 

so question how implement these views , urls project , how create email confirmation using from django.core.mail import send_mail

thanks in advance


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -