Properly load the site name in the template, oops

This commit is contained in:
Danielle McLean 2017-10-23 09:43:26 +11:00
parent 55abf1780e
commit 58d446f711
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
3 changed files with 7 additions and 3 deletions

View file

@ -124,3 +124,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/1.11/howto/static-files/
STATIC_URL = '/static/'
# Settings specific to lemoncurry
LEMONCURRY_SITE_NAME = '00dani.me'

View file

@ -1,7 +1,7 @@
{% load lemoncurry_tags static %}<!doctype html>
<html lang="en" class="{% block html_class %}{% endblock %}">
<head>
<title class="p-name">{{ site_name }}</title>
<title class="p-name">{% site_name %}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
@ -11,7 +11,7 @@
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark">
<a class="navbar-brand" href="{% url 'home:index' %}">Site</a>
<a class="navbar-brand" href="{% url 'home:index' %}">{% site_name %}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>

View file

@ -5,4 +5,4 @@ register = template.Library()
@register.simple_tag
def site_name():
return settings.SITE_NAME
return settings.LEMONCURRY_SITE_NAME