Add product info to settings file
This commit is contained in:
parent
a0ecf70986
commit
010ad6ef4f
@ -1,4 +1,5 @@
|
||||
from django import template
|
||||
from django.conf import settings
|
||||
|
||||
register = template.Library()
|
||||
|
||||
@ -17,3 +18,8 @@ def input_class(bound_field):
|
||||
elif field_type(bound_field) != 'PasswordInput':
|
||||
css_class = 'is-valid'
|
||||
return 'form-control {}'.format(css_class)
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def settings_value(name):
|
||||
return getattr(settings, name, '')
|
||||
|
@ -158,6 +158,8 @@ EMAIL_PORT = 25
|
||||
|
||||
URL_LOCATION_PROCESSOR = 'http://127.0.0.1:8000/billard/process_locationdata'
|
||||
|
||||
PRODUCT_INFO = 'CAROM-DEV'
|
||||
|
||||
try:
|
||||
from local_settings import *
|
||||
except ImportError:
|
||||
|
@ -1,10 +1,10 @@
|
||||
{% load static %}<!DOCTYPE html>
|
||||
{% load static form_tags %}<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>carom - {% block title %}TITLE SETZEN{% endblock %}</title>
|
||||
<title>{% settings_value "PRODUCT_INFO" %} - {% block title %}TITLE SETZEN{% endblock %}</title>
|
||||
<meta name="description" content="carom billard management">
|
||||
<meta name="author" content="Robert Einsle <robert@einsle.de>">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
@ -26,7 +26,7 @@
|
||||
<div class="wrapper">
|
||||
<nav class="navbar navbar-expand-sm navbar-dark bg-dark">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{% url 'index' %}">carom</a>
|
||||
<a class="navbar-brand" href="{% url 'index' %}">{% settings_value "PRODUCT_INFO" %}</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainMenu"
|
||||
aria-controls="mainMenu" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends '_base.html' %}
|
||||
|
||||
{% load static %}
|
||||
{% load static form_tags %}
|
||||
|
||||
{% block stylesheet %}
|
||||
<link rel="stylesheet" href="{% static 'css/login.css' %}">
|
||||
@ -9,7 +9,7 @@
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
<h1 class="text-center logo my-4">
|
||||
<a href="{% url 'billard:location_index' %}">carom</a>
|
||||
<a href="{% url 'billard:location_index' %}">{% settings_value "PRODUCT_INFO" %}</a>
|
||||
</h1>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user