I'd like to show a little greeting text on a page that either says
either "not logged in", or "hi <name>" (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 template contains:

    {% extends "mysite/base.html" %}
    {% block greeting %}{{ greeting }}{% endblock %}

I figured each view function would check for
``request.user.is_authenticated()`` and then fill in ``greeting`` as
required. But the problem is, if I don't set ``greeting`` in the view
function, I don't get the default "not logged in" text in the
resulting html.

What's the customary way to get that default text to show up unless
told otherwise?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to