1
0

Initial Commit

This commit is contained in:
2017-12-31 03:40:56 +03:00
commit 4dbb509588
18 changed files with 343 additions and 0 deletions

11
app/settings_db.py Normal file
View File

@@ -0,0 +1,11 @@
from django.core.exceptions import ObjectDoesNotExist
from app.models import Setting
from django.conf import settings
def get_setting(name, language=settings.LANGUAGE_CODE):
# TODO: This function
try:
return Setting.objects.filter(name=name)[0].get().string
except ObjectDoesNotExist:
return 'Oops, setting {0} not found!'.format(name)