Browse Source

Allow for some branding.

tags/v0.4.0
Isaac Bythewood 12 years ago
parent
commit
add91eabbc
3 changed files with 13 additions and 2 deletions
  1. +7
    -0
      pinry/core/context_processors.py
  2. +2
    -2
      pinry/core/templates/core/base.html
  3. +4
    -0
      pinry/settings/__init__.py

+ 7
- 0
pinry/core/context_processors.py View File

@@ -0,0 +1,7 @@
from django.conf import settings


def template_settings(request):
return {
'site_name': settings.SITE_NAME,
}

+ 2
- 2
pinry/core/templates/core/base.html View File

@@ -3,7 +3,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Pinry - {% block title %}{% endblock %}</title>
<title>{{ site_name }} - {% block title %}{% endblock %}</title>

{% if debug %}
<link rel="stylesheet" href="/static/vendor/bootstrap/2.0.3/css/bootstrap.css">
@@ -20,7 +20,7 @@
<body>
<div class="navbar navbar-fixed-top">
<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">
{% if user.is_authenticated %}


+ 4
- 0
pinry/settings/__init__.py View File

@@ -2,6 +2,9 @@ import os
from django.contrib.messages import constants as messages


SITE_NAME = 'Pinry'


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.request",
"django.contrib.messages.context_processors.messages",
"pinry.core.context_processors.template_settings",
)

ROOT_URLCONF = 'pinry.urls'


Loading…
Cancel
Save