> I have a template which will be used by two views. One of the views > has a variable defined that the other one does not. I know how to > test for an empty and null value in a variable, but how do you test > for the existence of the variable itself?
You can just do {% if variable %} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---