Allow for some branding.

This commit is contained in:
Isaac Bythewood
2012-07-25 01:58:40 +00:00
parent a178144da4
commit add91eabbc
3 changed files with 13 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
from django.conf import settings
def template_settings(request):
return {
'site_name': settings.SITE_NAME,
}

View File

@@ -3,7 +3,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Pinry - {% block title %}{% endblock %}</title> <title>{{ site_name }} - {% block title %}{% endblock %}</title>
{% if debug %} {% if debug %}
<link rel="stylesheet" href="/static/vendor/bootstrap/2.0.3/css/bootstrap.css"> <link rel="stylesheet" href="/static/vendor/bootstrap/2.0.3/css/bootstrap.css">
@@ -20,7 +20,7 @@
<body> <body>
<div class="navbar navbar-fixed-top"> <div class="navbar navbar-fixed-top">
<div class="navbar-inner"> <div class="navbar-inner">
<a href="{% url core:home %}" class="brand">Pinry</a> <a href="{% url core:home %}" class="brand">{{ site_name }}</a>
<ul class="nav pull-right"> <ul class="nav pull-right">
{% if user.is_authenticated %} {% if user.is_authenticated %}

View File

@@ -2,6 +2,9 @@ import os
from django.contrib.messages import constants as messages from django.contrib.messages import constants as messages
SITE_NAME = 'Pinry'
SITE_ROOT = os.path.join(os.path.realpath(os.path.dirname(__file__)), '../../') SITE_ROOT = os.path.join(os.path.realpath(os.path.dirname(__file__)), '../../')
@@ -39,6 +42,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.static", "django.core.context_processors.static",
"django.core.context_processors.request", "django.core.context_processors.request",
"django.contrib.messages.context_processors.messages", "django.contrib.messages.context_processors.messages",
"pinry.core.context_processors.template_settings",
) )
ROOT_URLCONF = 'pinry.urls' ROOT_URLCONF = 'pinry.urls'