You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
I'm trying to check {% if homepage %} then show <img ...> {% endif %}
I'm not sure how to go about a test to check the current page if it's my homepage. Do I need to mess around with context processors? What's the usual way of doing it? And how would the {% if ... %} look like?
Kev Dwyer
unread,
Mar 25, 2012, 3:49:33 AM3/25/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
easypie wrote:
Assuming your home is named "home" in your urls.py, you could try:
{% url home as home %}
{% if request.path == home %}<!-- do stuff -->{% endif %}
easypie
unread,
Mar 25, 2012, 1:51:42 PM3/25/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com, kevin....@gmail.com
wow. thank you very much! i didn't know the extra string passed in patterns inside a tuple was used in that way too. Does this have to do with get_absolute_url too?
This is what I did:
{% url satchmo_shop_home as home %}
{% if request.path == home %}<!-- do stuff -->{% endif %}