Skip to content

Instantly share code, notes, and snippets.

@sascari
Created September 13, 2013 23:26
Show Gist options
  • Select an option

  • Save sascari/6557324 to your computer and use it in GitHub Desktop.

Select an option

Save sascari/6557324 to your computer and use it in GitHub Desktop.
Override Blocks
# -- in nav-base.html --
<ul class="nav pull-right">
<li>{% block item-home %} <a href="{% url 'shortener:create' %}">{% trans "HOME" %}</a> {% endblock %}</li>
<li>{% block item-about %} <a href="#">{% trans "ABOUT US" %}</a> {% endblock %}</li>
<li>{% block item-info %} <a href="{% url 'staticpages:detail' %}">{% trans "INFO" %}</a> {% endblock %}</li>
# -- in home.html --
{% extends 'nav-base.html' %}
{% block item-home %} <a href="{% url 'shortener:create' %}" class="active">{% trans "HOME" %}</a> {% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment