# HG changeset patch # User Brian Neal # Date 1381976403 18000 # Node ID 91a229ee9a842152fb5e80adf199bd3aff95a68b # Parent 0a8942306b04e5f94080e3262637b63022431fe2 Bootstrap: made the navbar a template tag. Navbar now active on contact and mailing list pages. diff -r 0a8942306b04 -r 91a229ee9a84 core/models.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/models.py Wed Oct 16 21:20:03 2013 -0500 @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff -r 0a8942306b04 -r 91a229ee9a84 core/templatetags/core_tags.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/templatetags/core_tags.py Wed Oct 16 21:20:03 2013 -0500 @@ -0,0 +1,10 @@ +"""Core tags, common to many application templates.""" +from django import template + + +register = template.Library() + + +@register.inclusion_tag('core/navbar_tag.html') +def navbar(active_tab): + return {'active_tab': active_tab} diff -r 0a8942306b04 -r 91a229ee9a84 madeira/settings/base.py --- a/madeira/settings/base.py Wed Oct 16 20:32:58 2013 -0500 +++ b/madeira/settings/base.py Wed Oct 16 21:20:03 2013 -0500 @@ -102,6 +102,7 @@ 'localflavor', 'articles', 'band', + 'core', 'email_list', 'gigs', 'mp3', diff -r 0a8942306b04 -r 91a229ee9a84 madeira/templates/band/contact.html --- a/madeira/templates/band/contact.html Wed Oct 16 20:32:58 2013 -0500 +++ b/madeira/templates/band/contact.html Wed Oct 16 21:20:03 2013 -0500 @@ -1,5 +1,7 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | Contact{% endblock %} +{% block navblock %}{% navbar 'contact' %}{% endblock %} {% block content %}

Madeira Contact Info

For general band inquiries, send email to: themadeira@themadeira.net.

diff -r 0a8942306b04 -r 91a229ee9a84 madeira/templates/base.html --- a/madeira/templates/base.html Wed Oct 16 20:32:58 2013 -0500 +++ b/madeira/templates/base.html Wed Oct 16 21:20:03 2013 -0500 @@ -15,62 +15,7 @@ - - - +{% block navblock %}{% endblock %}
Madeira Logo diff -r 0a8942306b04 -r 91a229ee9a84 madeira/templates/core/navbar_tag.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/madeira/templates/core/navbar_tag.html Wed Oct 16 21:20:03 2013 -0500 @@ -0,0 +1,55 @@ + diff -r 0a8942306b04 -r 91a229ee9a84 madeira/templates/email_list/subscribe_form.html --- a/madeira/templates/email_list/subscribe_form.html Wed Oct 16 20:32:58 2013 -0500 +++ b/madeira/templates/email_list/subscribe_form.html Wed Oct 16 21:20:03 2013 -0500 @@ -1,5 +1,7 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | Mailing List{% endblock %} +{% block navblock %}{% navbar 'mail' %}{% endblock %} {% block content %}

Madeira Mailing List

Get on the Madeira mailing list to receive updates about upcoming shows, releases, and website updates. diff -r 0a8942306b04 -r 91a229ee9a84 madeira/templates/email_list/subscribe_request.html --- a/madeira/templates/email_list/subscribe_request.html Wed Oct 16 20:32:58 2013 -0500 +++ b/madeira/templates/email_list/subscribe_request.html Wed Oct 16 21:20:03 2013 -0500 @@ -1,5 +1,7 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | Mailing List Subscription Confirmation{% endblock %} +{% block navblock %}{% navbar 'mail' %}{% endblock %} {% block content %}

Madeira Mailing List Subscription Confirmation

diff -r 0a8942306b04 -r 91a229ee9a84 madeira/templates/email_list/subscribed.html --- a/madeira/templates/email_list/subscribed.html Wed Oct 16 20:32:58 2013 -0500 +++ b/madeira/templates/email_list/subscribed.html Wed Oct 16 21:20:03 2013 -0500 @@ -1,5 +1,7 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | Mailing List Subscription Confirmation{% endblock %} +{% block navblock %}{% navbar 'mail' %}{% endblock %} {% block content %}

Madeira Mailing List Subscription Confirmation

Congratulations! You have been successfully added to our email list.

diff -r 0a8942306b04 -r 91a229ee9a84 madeira/templates/email_list/unsubscribe_request.html --- a/madeira/templates/email_list/unsubscribe_request.html Wed Oct 16 20:32:58 2013 -0500 +++ b/madeira/templates/email_list/unsubscribe_request.html Wed Oct 16 21:20:03 2013 -0500 @@ -1,5 +1,7 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | Mailing List Unsubscribe Confirmation{% endblock %} +{% block navblock %}{% navbar 'mail' %}{% endblock %} {% block content %}

Madeira Mailing List Unsubscribe Confirmation

diff -r 0a8942306b04 -r 91a229ee9a84 madeira/templates/email_list/unsubscribed.html --- a/madeira/templates/email_list/unsubscribed.html Wed Oct 16 20:32:58 2013 -0500 +++ b/madeira/templates/email_list/unsubscribed.html Wed Oct 16 21:20:03 2013 -0500 @@ -1,5 +1,7 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | Mailing List Subscription Removal{% endblock %} +{% block navblock %}{% navbar 'mail' %}{% endblock %} {% block content %}

Madeira Mailing List Subscription Removal

You have been successfully removed from our email list.