I was tackling this problem recently and found several approaches by searching for Django login form. I ended up using a middleware solution that brings up a login page no matter where the user tries to go, then redirects them to the page they were trying to view... but that only makes sense if your users aren't allowed to see any page without logging in.
See http://www.mail-archive.com/[email protected]/msg06473.html <http://www.mail-archive.com/[email protected]/msg06473.html> Nick On Fri, Sep 24, 2010 at 8:23 AM, Tran Cao Thai <[email protected]>wrote: > Hello all, > > I have a login form that should appear in every pages of the site. How can > i create it from the views file ? Since every form is triggered by calling a > function in the views file, do i have to create the form in every function? > > -- > 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]<django-users%[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.

