Ticket #4225: contrib.auth.views.login_fixed2.patch
File contrib.auth.views.login_fixed2.patch, 799 bytes (added by , 18 years ago) |
---|
-
views.py
25 25 return HttpResponseRedirect(redirect_to) 26 26 else: 27 27 errors = {} 28 if Site._meta.installed: 29 site_name = Site.objects.get_current().name 30 else: 31 site_name = 'my site' 28 32 request.session.set_test_cookie() 29 33 return render_to_response(template_name, { 30 34 'form': oldforms.FormWrapper(manipulator, request.POST, errors), 31 35 REDIRECT_FIELD_NAME: redirect_to, 32 'site_name': Site.objects.get_current().name,36 'site_name': site_name 33 37 }, context_instance=RequestContext(request)) 34 38 35 39 def logout(request, next_page=None, template_name='registration/logged_out.html'):