Re: Login in all pages

2015-02-07 Thread Scot Hacker
On Thursday, February 5, 2015 at 5:35:09 AM UTC-8, Juan Diego Gonzalez wrote: > > 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. > > Install django-stronghold or similar. https://github.com/

Login in all pages

2015-02-06 Thread Nelson Varela
Take a look at middleware. You can create a middleware which runs for every request. In 'process_request' you can check if the user is authenticated. If not... show or redirect to the login view. The advantage is that you don't have to worry about placing decorators above your views. -- You

Re: Login in all pages

2015-02-05 Thread Kristofer Pettijohn
groups.com 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 singl

Login in all pages

2015-02-05 Thread Juan Diego Gonzalez
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