On Mon, Jun 20, 2011 at 10:15 PM, Kevin Miller <kevinvani...@gmail.com> wrote: > Hi all, > > I am in the process of finishing up an app. However, I just cannot > integrate django-registration and sessions properly. I can allow a > user to register and also log in. But > I am a bit confused in getting in to work with sessions. Eg. I want to > get information based on the user that is logged in. I have look in > the django book on session management and understand > how to create sessions and destroy sessions..etc. So I believe I could > do the entire process manually without email activation. But > django-registration allows email activation which I also need. So I > really want to use it but cannot integrate it with sessions. > > sessions do not event work with my templates. I tried to post a link > only if the user is authenticated by doing this: > > {% if user.is_authenticated %} > <a href=''>Log Out</a> > {% endif %} > > and it will not work, even after I log in the system using > django-registration. I believe there is some broken link in my > understanding of django-registration. > Can anyone please tell me how to integrate session management with > django-registration. Google did not help me that much. > > > Thanks in advance. > > Kevin. >
Use a RequestContext when rendering a template if you want access to things like 'user' and 'session'. https://docs.djangoproject.com/en/1.3/ref/templates/api/#subclassing-context-requestcontext Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.