added all needed fresh

This commit is contained in:
botsi 2020-02-02 22:09:04 +01:00
parent 64015dd413
commit 4815c42ea7
10 changed files with 48 additions and 31 deletions

View file

@ -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 = (

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 150.1 26.4" enable-background="new 0 0 150.1 26.4" xml:space="preserve">
<rect x="43.2" fill="#FFFFFF" width="6.4" height="26.4"/>
<polygon fill="#FFFFFF" points="73.6,26.4 57.6,0 64.9,0 76.1,19.2 86.6,0 93.2,0 78,26.4 "/>
<rect x="100.6" fill="#FFFFFF" width="6.4" height="26.4"/>
<path fill="#FFFFFF" d="M148.3,1.7c-0.9-0.8-2.3-1.7-5-1.7h-20.4c-2.7,0-4,0.9-5,1.7s-1.9,2-1.9,4.5v13.9c0,2.4,0.9,3.7,1.9,4.5
c0.9,0.8,2.3,1.7,5,1.7h20.4c2.6,0,4-0.9,4.9-1.7c1-0.8,1.9-2.1,1.9-4.5V6.2C150.1,3.7,149.2,2.5,148.3,1.7z M143.7,19.3
c0,1.2-1.2,2.1-2.7,2.1h-15.7c-1.5,0-2.7-0.9-2.7-2.1V7c0-1.2,1.2-2.1,2.7-2.1H141c1.5,0,2.7,1,2.7,2.1V19.3z"/>
<path fill="#FFFFFF" d="M0,0v26.4l0,0h27.2c2.6,0,4-0.9,4.9-1.7c1-0.8,1.9-2.1,1.9-4.5V6.2c0-2.5-0.9-3.7-1.9-4.5
c-0.9-0.8-2.3-1.7-5-1.7L0,0L0,0z M27.6,19.3c0,1.2-1.2,2.1-2.7,2.1H6.4v-2.1V7V4.9h18.4c1.5,0,2.7,1,2.7,2.1v12.2H27.6z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 924 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

View file

@ -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<path>.*)$', serve,
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
] + staticfiles_urlpatterns() + urlpatterns
] + staticfiles_urlpatterns() + urlpatterns

Binary file not shown.