django-userena views.py和用户注册问题 [英] django-userena views.py and user registration issues
问题描述
django-userena 没有一个views.py文件。它使用html文件,我想使用这个views.py 而不是html文件,因为我想添加一些其他功能,如文件上传器。我很难实施 django-jquery-file-upload 等应用程式
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.
推荐答案
我想做的第一件事是摆脱html文件
,并将其替换为这个views.py,
django- userena是我看到的第一个没有
的应用程序。views.py
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有:
- urls.py将URL绑定到view.py中的函数
- views.py,具有呈现的功能模板
现在,要覆盖userena的内容,我写了一个刚刚为你发布的博文。
Now, to override stuff from userena, i wrote a blog post just for you.
其次,我设置了django-userena演示项目,但是每当
用户注册时,我必须登录管理区域并激活他的
帐户并授予他权限,我想自动做这个
,当用户确认他的电子邮件,怎么样?
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?
你可以设置 USERENA_ACTIVATION_REQUIRED = settings.py settings
You can set USERENA_ACTIVATION_REQUIRED=False in settings.py
这篇关于django-userena views.py和用户注册问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!