Re: How to get logged username in template

2015-11-12 Thread Dariusz Mysior
Thanks for both advice. I am not advanced programmer sow I use the simplest solution on this moment this first one Andréas Kühne. Thanks it works! W dniu czwartek, 12 listopada 2015 08:46:06 UTC+1 użytkownik Dariusz Mysior napisał: > > I am using Django 1.8 with Python 3.4 I had no idea why my

Re: How to get logged username in template

2015-11-12 Thread Dan Tagg
I would recommend using allauth http://django-allauth.readthedocs.org/en/latest/templates.html. It has template tags for adding all that info, creates pages for logging in, picks up your base template etc etc. Dan On 12 November 2015 at 08:57, Andreas Kuhne wrote: >

Re: How to get logged username in template

2015-11-12 Thread Andreas Kuhne
Hi, First of all, you are using request.user.username and not username in your template. If you want the username to be accessed via the "username" variable. You should write this in your view: def profile(request): return render_to_response('accounts/profile.html', {'username':