On 21 February 2010 19:38, Timothy Kinney <[email protected]> wrote: > There may be a more elegant way, but I think you could just call the login > view from whatever view the url directs the user too. So it fills in the > login info and then renders the rest of the page...but on second thought > maybe you need to include the login form in every view... > > > > On Sun, Feb 21, 2010 at 10:44 AM, Patrick <[email protected]> wrote: >> >> I thought that if I put the login forms on the base template and then >> extend all others from that base template, the login forms would be >> available all the way through. But there is a problem: the login forms >> are only displayed if the url is processed by the 'login' view. That >> login view provides the forms needed for authentication, among other >> things. >> >> The thing is, what I want is to allow user to authenticate no matter >> what page from the site he is visitting. How can that be done? >> >> Many thanks in advance, >> >> Patrick Steiger >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. >
Well you could put form HTML in base.html for example and just make it post on login URL. Or perhaps you could put it in context processor [1]. Can't think of more elegant solution right now. [1] http://docs.djangoproject.com/en/dev/ref/templates/api/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

