Re: template inheritance and default text

2007-09-17 Thread bramble
On Sep 17, 6:12 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 9/17/07, bramble <[EMAIL PROTECTED]> wrote: > > > My base.html has this: > > > {% block greeting %}not logged in{% endblock %} > > Personally, I wouldn't use the view for this; I'd do > > {% if user.is_authenticated %}Hello, {

Re: template inheritance and default text

2007-09-17 Thread bramble
Those sound like great options. Thanks a lot, James. --~--~-~--~~~---~--~~ 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

Re: template inheritance and default text

2007-09-17 Thread James Bennett
On 9/17/07, bramble <[EMAIL PROTECTED]> wrote: > My base.html has this: > > {% block greeting %}not logged in{% endblock %} Personally, I wouldn't use the view for this; I'd do {% if user.is_authenticated %}Hello, {{ user.username }}{% else %}Not logged in{% endif %} If you must assign the

template inheritance and default text

2007-09-17 Thread bramble
I'd like to show a little greeting text on a page that either says either "not logged in", or "hi " (showing the User's name), but am having problems getting the default "not logged in" text show up. My base.html has this: {% block greeting %}not logged in{% endblock %} And the child templa