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 "greeting" variable in views, I'd do it like so: {% if greeting %}{{ greeting }}{% else %}Not logged in{% endif %} (this way, if the "greeting" variable is not set, you get what you want -- you could also put "{{ block.super }}" in place of the "Not logged in" text) -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---