2024-09-27 21:30:15 发布
网友
(r'^login/?$','django.contrib.auth.views.login',{'template_name':'login.html', 'authentication_form':CustomAuthenticationForm}),
我该如何添加HTTPS?我通常会有一个装修工来做。。在
但在这种情况下,我不能应用它。在
我相信您可以这样包装函数:
from django.contrib.auth.views import login from <<wherever>> import secure_required urlpatterns = patterns('', (r'^login/?$',secure_required(login),{'template_name':'login.html', 'authentication_form':CustomAuthenticationForm}), )
我相信您可以这样包装函数:
相关问题 更多 >
编程相关推荐