I think the login decorator may give you what you are trying to do in a much 
easier way: 
https://docs.djangoproject.com/en/1.7/topics/auth/default/#limiting-access-to-logged-in-users
 

Unless I am not understanding your issue. 


From: "Juan Diego Gonzalez" <[email protected]> 
To: [email protected] 
Sent: Thursday, February 5, 2015 7:35:09 AM 
Subject: Login in all pages 

Hi, I need to put the django login feature in all pages, I mean, the user will 
be able to login in the reserved area of the web from any public page. 

I have all the implementation done, and it works with a single page, in this 
way: 
url(r'^home/$', magic.views.login, {'template_name':'magic/index.html'}), 

I have put the code in a template, and it works only with home page, that is 
logical. Could anyone help me, please. I doesn't find any documentation. 

May be something like url(r'^*/$', magic.views.login, 
{'template_name':'magic/index.html'}), 

where * means any page. 

Thank you very much. 

Diego. 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group. 
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] . 
To post to this group, send email to [email protected] . 
Visit this group at http://groups.google.com/group/django-users . 
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d44e8397-4b0a-4056-8f48-908793762ff4%40googlegroups.com
 . 
For more options, visit https://groups.google.com/d/optout . 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1686270082.107074.1423185601285.JavaMail.zimbra%40cybernetik.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to