django-userena views.py and user registration issues

╄→гoц情女王★ 提交于 2019-12-13 18:06:41

问题


django-userena does not have a views.py file. It uses instead html files, i would like to use this views.py instead of the html files, because i want to add some other features, like a file uploader. I'm having a hard time implementing apps like django-jquery-file-upload

The second question is how to activate the user's account automatically after that he confirms his email.


回答1:


The first thing that i would like to do is get rid of the html files and replace them with this views.py, django-userena is the first app I've seen that does not have a views.py

Userena has:

  • urls.py that bind urls to functions in views.py
  • views.py that have functions that render templates

Now, to override stuff from userena, i wrote a blog post just for you.

Secondly, i set up the django-userena demo project but every time a user signs up, i have to login to the admin area and activate his account and give him permissions, I would like to do that automatically, when the user confirms his email, how?

You can set USERENA_ACTIVATION_REQUIRED=False in settings.py



来源:https://stackoverflow.com/questions/9832037/django-userena-views-py-and-user-registration-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!