Skip to content
This repository was archived by the owner on Oct 26, 2019. It is now read-only.

Commit e9e171c

Browse files
author
Stefan Reinhard
committed
initial setup
0 parents  commit e9e171c

19 files changed

+1226
-0
lines changed

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
*.pyc
2+
*~
3+
.*.swp
4+
\#*#
5+
.DS_Store
6+
._*
7+
.Python
8+
.idea
9+
*.egg-info/
10+
data.db
11+
MANIFEST
12+
/build
13+
/dist
14+
/lib
15+
/static
16+
/uploads
17+
/local
18+
/share
19+
/venv
20+
/htdocs
21+
/log

ausbildung/__init__.py

Whitespace-only changes.

ausbildung/models.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from django.utils.translation import ugettext_lazy as _
2+
3+
from feincms.module.page.models import Page
4+
from feincms.content.richtext.models import RichTextContent
5+
from feincms.content.medialibrary.v2 import MediaFileContent
6+
7+
#Page.register_extensions()
8+
9+
Page.register_templates({
10+
'title': _('Standard'),
11+
'path': 'base.html',
12+
'regions': (
13+
('main', _('Main content area')),
14+
),
15+
})
16+
17+
Page.create_content_type(RichTextContent)
18+
Page.create_content_type(MediaFileContent, TYPE_CHOICES=(
19+
('default', _('default')),
20+
))

ausbildung/settings.py

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
import os
2+
import sys
3+
4+
WEBAPP_DIR = os.path.dirname(os.path.abspath(__file__))
5+
APP_BASEDIR = os.path.abspath(os.path.join(WEBAPP_DIR, os.path.pardir))
6+
DEBUG = any((cmd in sys.argv for cmd in (
7+
'runserver', 'shell', 'dbshell', 'sql', 'sqlall')))
8+
TEMPLATE_DEBUG = DEBUG
9+
10+
ADMINS = (
11+
('Gloggi Admin', '[email protected]'),
12+
)
13+
14+
MANAGERS = ADMINS
15+
16+
DATABASES = {'default': {
17+
'ENGINE': 'django.db.backends.sqlite3',
18+
'NAME': os.path.join(APP_BASEDIR, 'data.db'),
19+
'USER': '',
20+
'PASSWORD': '',
21+
'HOST': '',
22+
'PORT': '',
23+
}}
24+
25+
TIME_ZONE = 'Europe/Zurich'
26+
27+
LANGUAGE_CODE = 'de-CH'
28+
29+
SITE_ID = 1
30+
31+
USE_I18N = False
32+
USE_L10N = False
33+
USE_TZ = False
34+
35+
MEDIA_ROOT = os.path.join(APP_BASEDIR, 'uploads')
36+
MEDIA_URL = '/uploads/'
37+
38+
STATIC_ROOT = os.path.join(APP_BASEDIR, 'static')
39+
STATIC_URL = '/static/'
40+
41+
STATICFILES_DIRS = (
42+
os.path.join(APP_BASEDIR, 'ausbildung', 'static'),
43+
)
44+
45+
STATICFILES_FINDERS = (
46+
'django.contrib.staticfiles.finders.FileSystemFinder',
47+
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
48+
)
49+
50+
TEMPLATE_LOADERS = (
51+
'django.template.loaders.filesystem.Loader',
52+
'django.template.loaders.app_directories.Loader',
53+
# 'django.template.loaders.eggs.Loader',
54+
)
55+
56+
MIDDLEWARE_CLASSES = (
57+
'django.middleware.common.CommonMiddleware',
58+
'django.contrib.sessions.middleware.SessionMiddleware',
59+
'django.middleware.csrf.CsrfViewMiddleware',
60+
'django.contrib.auth.middleware.AuthenticationMiddleware',
61+
'django.contrib.messages.middleware.MessageMiddleware',
62+
# Uncomment the next line for simple clickjacking protection:
63+
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
64+
)
65+
66+
ROOT_URLCONF = 'ausbildung.urls'
67+
68+
WSGI_APPLICATION = 'ausbildung.wsgi.application'
69+
70+
TEMPLATE_DIRS = (
71+
os.path.join(APP_BASEDIR, 'ausbildung', 'templates'),
72+
)
73+
74+
TEMPLATE_CONTEXT_PROCESSORS = (
75+
'django.contrib.auth.context_processors.auth',
76+
'django.core.context_processors.debug',
77+
'django.core.context_processors.i18n',
78+
'django.core.context_processors.media',
79+
'django.core.context_processors.static',
80+
'django.core.context_processors.tz',
81+
'django.contrib.messages.context_processors.messages',
82+
'django.core.context_processors.request'
83+
)
84+
85+
INSTALLED_APPS = (
86+
'django.contrib.auth',
87+
'django.contrib.contenttypes',
88+
'django.contrib.sessions',
89+
'django.contrib.sites',
90+
'django.contrib.messages',
91+
'django.contrib.staticfiles',
92+
'django.contrib.admin',
93+
'django.contrib.admindocs',
94+
95+
'feincms',
96+
'feincms.module.page',
97+
'feincms.module.medialibrary',
98+
'fhadmin',
99+
'tinymce',
100+
'south',
101+
102+
'ausbildung',
103+
)
104+
105+
FEINCMS_RICHTEXT_INIT_CONTEXT = {
106+
'TINYMCE_JS_URL': STATIC_URL + '/tiny_mce/tiny_mce.js',
107+
}
108+
109+
from fhadmin import FHADMIN_GROUPS_REMAINING
110+
_ = lambda x: x
111+
112+
FHADMIN_GROUPS_CONFIG = [
113+
(_('Main content'), {
114+
'apps': ('page', 'medialibrary', 'blog'),
115+
}),
116+
(_('Modules'), {
117+
'apps': ('links', FHADMIN_GROUPS_REMAINING),
118+
}),
119+
(_('Preferences'), {
120+
'apps': ('auth', 'rosetta', 'external', 'sites'),
121+
}),
122+
]

0 commit comments

Comments
 (0)