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/
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
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
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
4 matches
Mail list logo