This commit is contained in:
Tomislav R 2016-03-01 21:24:51 +01:00
parent 0558d6e396
commit 7936e5dfe5
36 changed files with 45 additions and 40 deletions

View file

@ -41,7 +41,7 @@ configure the values for the ssh host, user, port and target directory.
Run: Run:
$ python manage.py makemigratoins $ python manage.py makemigratoins
$ python manage.py syncdb $ python manage.py migrate
7. Setup a circus configuration. 7. Setup a circus configuration.

View file

@ -6,7 +6,7 @@ from django.utils.translation import ugettext as _
class CMSGalleryPlugin(CMSPluginBase): class CMSGalleryPlugin(CMSPluginBase):
model = DGGalleryPlugin model = DGGalleryPlugin
name = _("Digital Glarus Gallery") name = _("Digital Glarus Gallery")
render_template = "cms/digitalglarus/gallery.html" render_template = "digitalglarus/gallery.html"
def render(self, context, instance, placeholder): def render(self, context, instance, placeholder):
context.update({ context.update({
@ -19,7 +19,7 @@ class CMSGalleryPlugin(CMSPluginBase):
class CMSSupportersPlugin(CMSPluginBase): class CMSSupportersPlugin(CMSPluginBase):
name = _("Digital Glarus Supporters") name = _("Digital Glarus Supporters")
model = DGSupportersPlugin model = DGSupportersPlugin
render_template = "cms/digitalglarus/supporters_plugin.html" render_template = "digitalglarus/supporters_plugin.html"
def render(self, context, instance, placeholder): def render(self, context, instance, placeholder):
context.update({ context.update({

View file

@ -5,7 +5,9 @@ Copyright 2015 ungleich.
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os import os
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
# dotenv # dotenv
import dotenv import dotenv
@ -15,6 +17,7 @@ gettext = lambda s: s
def env(env_name): def env(env_name):
return os.environ.get(env_name) return os.environ.get(env_name)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_DIR = os.path.abspath( PROJECT_DIR = os.path.abspath(
@ -122,6 +125,12 @@ TEMPLATES = [
'django.template.context_processors.request', 'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages', 'django.contrib.messages.context_processors.messages',
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages",
'sekizai.context_processors.sekizai',
'cms.context_processors.cms_settings',
], ],
}, },
}, },
@ -129,27 +138,11 @@ TEMPLATES = [
WSGI_APPLICATION = 'dynamicweb.wsgi.application' WSGI_APPLICATION = 'dynamicweb.wsgi.application'
# Deprecated since version 1.8. TDIR = os.path.join(PROJECT_DIR, 'templates')
# callables take a request object as their argument and return a dictionary of
# items to be merged into the context.
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.request",
'sekizai.context_processors.sekizai',
'cms.context_processors.cms_settings',
)
TEMPLATE_DIRS = ( CMS_TEMPLATES_DIR = {
os.path.join(PROJECT_DIR, 'templates'),os.path.join(PROJECT_DIR, 'templates/cms/'), 1: os.path.join(TDIR, '')
) }
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { 'default': {
@ -268,11 +261,6 @@ MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
MEDIA_URL = APP_ROOT_ENDPOINT + 'media/' MEDIA_URL = APP_ROOT_ENDPOINT + 'media/'
FILE_UPLOAD_PERMISSIONS = 0o644 FILE_UPLOAD_PERMISSIONS = 0o644
# Templates confs
TEMPLATE_DIRS = (
os.path.join(PROJECT_DIR, "templates"),
)
META_SITE_PROTOCOL = 'http' META_SITE_PROTOCOL = 'http'
META_USE_SITES = True META_USE_SITES = True
@ -415,4 +403,4 @@ META_INCLUDE_KEYWORDS = ["ungleich", "hosting", "switzerland",
"Schweiz", "Swiss", "cdist"] "Schweiz", "Swiss", "cdist"]
META_USE_SITES = True META_USE_SITES = True
PARLER_LANGUAGES = {1: ({'code': 'en-us'}, {'code': 'de'}, )} PARLER_LANGUAGES = {1: ({'code': 'en-us'}, {'code': 'de'},)}

View file

@ -4,12 +4,12 @@ ALLOWED_HOSTS = [
"*" "*"
] ]
DATABASES = { # DATABASES = {
'default': { # 'default': {
'ENGINE': 'django.db.backends.sqlite3', # 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'app.db', # 'NAME': 'app.db',
} # }
} # }
CACHES = { CACHES = {
'default': { 'default': {

View file

@ -33,3 +33,10 @@ Please use the -b command-line option or the PGBINOLD environment variable.
You must identify the directory where the old cluster binaries reside. You must identify the directory where the old cluster binaries reside.
Please use the -b command-line option or the PGBINOLD environment variable. Please use the -b command-line option or the PGBINOLD environment variable.
-----------------------------------------------------------------
pg_upgrade run on Tue Mar 1 20:46:31 2016
-----------------------------------------------------------------
You must identify the directory where the old cluster binaries reside.
Please use the -b command-line option or the PGBINOLD environment variable.

View file

@ -23,3 +23,8 @@
pg_upgrade run on Mon Feb 29 11:56:32 2016 pg_upgrade run on Mon Feb 29 11:56:32 2016
----------------------------------------------------------------- -----------------------------------------------------------------
-----------------------------------------------------------------
pg_upgrade run on Tue Mar 1 20:46:31 2016
-----------------------------------------------------------------

View file

@ -23,3 +23,8 @@
pg_upgrade run on Mon Feb 29 11:56:32 2016 pg_upgrade run on Mon Feb 29 11:56:32 2016
----------------------------------------------------------------- -----------------------------------------------------------------
-----------------------------------------------------------------
pg_upgrade run on Tue Mar 1 20:46:31 2016
-----------------------------------------------------------------

View file

@ -1,4 +1,4 @@
{% extends "cms/digitalglarus/base.html" %} {% extends "digitalglarus/base.html" %}
{% load staticfiles cms_tags %} {% load staticfiles cms_tags %}
{% block title %}About{% endblock %} {% block title %}About{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "cms/digitalglarus/base.html" %} {% extends "digitalglarus/base.html" %}
{% load cms_tags %} {% load cms_tags %}
{% block title %}Contact{% endblock %} {% block title %}Contact{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "cms/digitalglarus/base.html" %} {% extends "digitalglarus/base.html" %}
{% load staticfiles cms_tags %} {% load staticfiles cms_tags %}
{% block title %}About{% endblock %} {% block title %}About{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "cms/ungleichch/base.html" %} {% extends "ungleichch/base.html" %}
{% block base_content %} {% block base_content %}
{% block content %} {% block content %}
{% endblock %} {% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "cms/ungleichch/base.html" %} {% extends "ungleichch/base.html" %}
{% load cms_tags %} {% load cms_tags %}
{% block base_content %} {% block base_content %}
{% placeholder "page_content" %} {% placeholder "page_content" %}