Done some landing manipulations

This commit is contained in:
user committed 2018-01-05 15:34:01 +03:00
1 parent 64b5f39d41
commit fa7cb01c11
7 files changed
+13 -4

No files matched your search

+2 -2
View File
@@ -55,6 +55,6 @@ docs/_build/
.idea/ .idea/
db.sqlite3 db.sqlite3
migrations/* app/migrations/*
!migrations/__init__.py !app/migrations/__init__.py
venv/ venv/
+5
View File
@@ -1,3 +1,8 @@
from django.contrib import admin from django.contrib import admin
from django.contrib import admin
from app.models import Setting
# Register your models here. # Register your models here.
admin.site.register(Setting)
+2 -2
View File
@@ -5,9 +5,9 @@ from django.conf import settings
def get_setting(name, language=settings.LANGUAGE_CODE[:2]): def get_setting(name, language=settings.LANGUAGE_CODE[:2]):
try: try:
return Setting.objects.filter(name=name, language=language)[0].get().string return Setting.objects.filter(name=name, language=language)[0].string
except IndexError: except IndexError:
try: try:
return Setting.objects.filter(name=name)[0].get().string return Setting.objects.filter(name=name)[0].string
except IndexError: except IndexError:
return '<p class="error">Oops, setting {0} with language {1} not found!</p>'.format(name, language) return '<p class="error">Oops, setting {0} with language {1} not found!</p>'.format(name, language)
+1
View File
@@ -12,4 +12,5 @@ def home(request):
'title': _('Home'), 'title': _('Home'),
'app_name': settings.APP_NAME, 'app_name': settings.APP_NAME,
'app_description_text': get_setting('app_description_text'), 'app_description_text': get_setting('app_description_text'),
'app_mainpage_html': get_setting('app_mainpage_html'),
}) })
Regular → Executable
View File
File mode changed.
+2
View File
@@ -4,6 +4,8 @@
body { body {
background-color: black; background-color: black;
color: lime; color: lime;
max-width: 800px;
margin: auto;
} }
::selection { ::selection {
color: black; color: black;
+1
View File
@@ -9,4 +9,5 @@
</div> </div>
<br/> <br/>
<hr/> <hr/>
{{ app_mainpage_html|safe }}
{% endblock %} {% endblock %}