Add product info to settings file

This commit is contained in:
2018-02-10 16:16:14 +01:00
parent a0ecf70986
commit 010ad6ef4f
4 changed files with 13 additions and 5 deletions

View File

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