Explorar el Código

Allow for some branding.

tags/v0.4.0
Isaac Bythewood hace 12 años
padre
commit
add91eabbc
Se han modificado 3 ficheros con 13 adiciones y 2 borrados
  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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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'


Cargando…
Cancelar
Guardar