We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
比如 https://github.com/jly8866/archer/blob/6e2bcef21a7235a436906f2dc952aff3530b07e6/sql/check_login_middleware.py
这里的未登录重定向到/login/ 可以通过 django 的 login_required 实现
from django.contrib.auth.decorators import login_required @login_required def my_view(request):
https://docs.djangoproject.com/en/1.8/topics/auth/default/#django.contrib.auth.decorators.login_required
不过这个要用的话就需要用上django 自带的一些认证系统, 这里的用户系统可能会需要一些扩充
角色这块可以用外键的方式扩充, 放在一个Profile table里,然后对应的 view可以使用 django的检验修饰器 做
等我搭好了会再提一个pull request
The text was updated successfully, but these errors were encountered:
非常好的建议!辛苦PR,然后发PR的url到群里@七月流火 ,review过后即可merge
Sorry, something went wrong.
No branches or pull requests
比如 https://github.com/jly8866/archer/blob/6e2bcef21a7235a436906f2dc952aff3530b07e6/sql/check_login_middleware.py
这里的未登录重定向到/login/ 可以通过 django 的 login_required 实现
https://docs.djangoproject.com/en/1.8/topics/auth/default/#django.contrib.auth.decorators.login_required
不过这个要用的话就需要用上django 自带的一些认证系统, 这里的用户系统可能会需要一些扩充
角色这块可以用外键的方式扩充, 放在一个Profile table里,然后对应的 view可以使用 django的检验修饰器 做
等我搭好了会再提一个pull request
The text was updated successfully, but these errors were encountered: