diff --git a/boday_it/settings.py b/boday_it/settings.py index aa1e30d..80ed25c 100644 --- a/boday_it/settings.py +++ b/boday_it/settings.py @@ -1,5 +1,10 @@ +import os import os # isort:skip -gettext = lambda s: s + + +def gettext(s): return s + + DATA_DIR = os.path.dirname(os.path.dirname(__file__)) """ Django settings for boday_it project. @@ -13,7 +18,6 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ -import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -28,24 +32,19 @@ SECRET_KEY = '2^!=u2@h+36s^_ikb9=#)10gr#ymp1ds0d0*)d@b+e8%9$vv-v' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['ww2.boday-it.ch','127.0.0.1'] +ALLOWED_HOSTS = ['ww2.boday-it.ch', '127.0.0.1'] # Application definition - - - ROOT_URLCONF = 'boday_it.urls' - - # Internationalization # https://docs.djangoproject.com/en/1.11/topics/i18n/ -LANGUAGE_CODE = 'en' +LANGUAGE_CODE = 'de' TIME_ZONE = 'America/New_York' @@ -74,7 +73,7 @@ SITE_ID = 1 TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join(BASE_DIR, 'boday_it', 'templates'),], + 'DIRS': [os.path.join(BASE_DIR, 'boday_it', 'templates'), ], 'OPTIONS': { 'context_processors': [ 'django.contrib.auth.context_processors.auth', @@ -143,22 +142,38 @@ INSTALLED_APPS = [ ] LANGUAGES = ( - ## Customize this + # Customize this ('en', gettext('en')), + ('de', gettext('de')), ) CMS_LANGUAGES = { - ## Customize this + # Customize this 1: [ { - 'redirect_on_fallback': True, - 'code': 'en', + # 'redirect_on_fallback': True, + 'code': 'de', 'hide_untranslated': False, + 'name': gettext('de'), + 'public': True, + }, + { + 'code': 'en', 'name': gettext('en'), + 'fallbacks': ['de'], 'public': True, }, ], + 2: [ + { + 'code': 'en', + 'name': gettext('en'), + 'public': True, + 'fallbacks': ['de'], + }, + ], 'default': { + 'fallbacks': ['en', 'de'], 'redirect_on_fallback': True, 'public': True, 'hide_untranslated': False, @@ -166,7 +181,7 @@ CMS_LANGUAGES = { } CMS_TEMPLATES = ( - ## Customize this + # Customize this ('fullwidth.html', 'Fullwidth'), ('sidebar_left.html', 'Sidebar Left'), ('sidebar_right.html', 'Sidebar Right') @@ -189,7 +204,7 @@ DATABASES = { } MIGRATION_MODULES = { - + } THUMBNAIL_PROCESSORS = ( diff --git a/boday_it/static/img/logo-divio.svg b/boday_it/static/img/logo-divio.svg deleted file mode 100644 index 7e9c3d0..0000000 --- a/boday_it/static/img/logo-divio.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/boday_it/static/img/logo-main@2x_org.png b/boday_it/static/img/logo-main@2x_org.png deleted file mode 100644 index 87cd8df..0000000 Binary files a/boday_it/static/img/logo-main@2x_org.png and /dev/null differ diff --git a/boday_it/static/img/logo-main@print_org.png b/boday_it/static/img/logo-main@print_org.png deleted file mode 100644 index 4bfaccd..0000000 Binary files a/boday_it/static/img/logo-main@print_org.png and /dev/null differ diff --git a/boday_it/static/img/logo-main_org.png b/boday_it/static/img/logo-main_org.png deleted file mode 100644 index 74aa64c..0000000 Binary files a/boday_it/static/img/logo-main_org.png and /dev/null differ diff --git a/boday_it/static/img/visuals/explorer-preview.png b/boday_it/static/img/visuals/explorer-preview.png deleted file mode 100644 index 68f45f3..0000000 Binary files a/boday_it/static/img/visuals/explorer-preview.png and /dev/null differ diff --git a/boday_it/static/img/visuals/feature-default_dump.jpg b/boday_it/static/img/visuals/feature-default_dump.jpg deleted file mode 100644 index e80b5e5..0000000 Binary files a/boday_it/static/img/visuals/feature-default_dump.jpg and /dev/null differ diff --git a/boday_it/static/img/visuals/feature-default_org.jpg b/boday_it/static/img/visuals/feature-default_org.jpg deleted file mode 100644 index 1ec1b99..0000000 Binary files a/boday_it/static/img/visuals/feature-default_org.jpg and /dev/null differ diff --git a/boday_it/urls.py b/boday_it/urls.py index 254c6ba..260989e 100644 --- a/boday_it/urls.py +++ b/boday_it/urls.py @@ -9,7 +9,23 @@ from django.contrib import admin from django.contrib.sitemaps.views import sitemap from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.static import serve +""" +from django.views.i18n import JavaScriptCatalog + +admin.autodiscover() + +urlpatterns = i18n_patterns( + url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'), +) +urlpatterns += staticfiles_urlpatterns() + +# note the django CMS URLs included via i18n_patterns +urlpatterns += i18n_patterns( + url(r'^admin/', include(admin.site.urls)), + url(r'^', include('cms.urls')), +) +""" admin.autodiscover() urlpatterns = [ @@ -27,4 +43,4 @@ if settings.DEBUG: urlpatterns = [ url(r'^media/(?P.*)$', serve, {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), - ] + staticfiles_urlpatterns() + urlpatterns + ] + staticfiles_urlpatterns() + urlpatterns diff --git a/project.db b/project.db index 27cff27..0c6a1c5 100644 Binary files a/project.db and b/project.db differ