Port to new django version - not yet fully working

- location field makes problems
This commit is contained in:
Martin Bauer
2019-01-05 11:27:15 +01:00
parent 72a9642a8e
commit 663185fd40
168 changed files with 797 additions and 5967 deletions

View File

@@ -1,10 +1,10 @@
# Setting the path
import os
gettext = lambda s: s
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
# Django settings for blechreiz project.
DEBUG = True
@@ -16,7 +16,6 @@ ADMINS = (
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
@@ -26,11 +25,10 @@ DATABASES = {
# Email
EMAIL_HOST='smtp.blechreiz.com'
EMAIL_HOST_USER='m02b721a'
EMAIL_HOST_PASSWORD='9Hp4WG5bZ2WVPX5z'
EMAIL_USE_TLS=False
EMAIL_HOST = 'smtp.blechreiz.com'
EMAIL_HOST_USER = 'm02b721a'
EMAIL_HOST_PASSWORD = '9Hp4WG5bZ2WVPX5z'
EMAIL_USE_TLS = False
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
@@ -78,8 +76,8 @@ STATIC_ROOT = PROJECT_PATH + '/static_collection'
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
LOGIN_URL="/musicians/login"
PUBLIC_URLS=( "^musicians/login/?$", "^musicians/login/usernames/?$", "^eventplanner_gcal/gcalApiCallback*")
LOGIN_URL = "/musicians/login"
PUBLIC_URLS = ("^musicians/login/?$", "^musicians/login/usernames/?$", "^eventplanner_gcal/gcalApiCallback*")
# Additional locations of static files
STATICFILES_DIRS = (
@@ -94,26 +92,42 @@ STATICFILES_DIRS = (
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'x$8&9s6t%eeg=wyhar87934wh_s$dbpm(73g4ho&n)9_wogj6p'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
PROJECT_PATH + '/templates',
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
# Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
# list if you haven't customized them:
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.i18n',
'django.template.context_processors.request',
'django.template.context_processors.media',
'django.template.context_processors.static',
'sekizai.context_processors.sekizai',
],
},
},
]
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
MIDDLEWARE = (
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'blechreiz.middleware.EnforceLoginMiddleware',
#'blechreiz.middleware.EnforceLoginMiddleware',
'blechreiz.middleware.DetectDevice',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
@@ -125,20 +139,6 @@ ROOT_URLCONF = 'blechreiz.urls'
WSGI_APPLICATION = 'blechreiz.wsgi.application'
TEMPLATE_DIRS = (
PROJECT_PATH + '/templates',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.i18n',
'django.core.context_processors.request',
'django.core.context_processors.media',
'django.core.context_processors.static',
'sekizai.context_processors.sekizai',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
@@ -148,45 +148,40 @@ INSTALLED_APPS = (
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'crispy_forms', # better looking forms ( bootstrap )
'sekizai', # for the addtoblock directive in templates
'rest_framework', # for event management api
'south',
'crispy_forms', # better looking forms ( bootstrap )
'sekizai', # for the addtoblock directive in templates
'rest_framework', # for event management api
# Own Things
'bootstrapTheme', # Theme
'website', # Blechreiz Website in general
'musicians', # User Management
'eventplanner', # Event Management
'eventplanner_gcal', # Event Management Sync with Google Calendar
'simpleforum', # Messages ( Forum )
'location_field', # custom location field used in Event Management
'scoremanager', # manager of scores, repertoire etc.
#'imagestore',
#'sorl.thumbnail',
#'tagging'
'bootstrapTheme', # Theme
'website', # Blechreiz Website in general
'musicians', # User Management
'eventplanner', # Event Management
'eventplanner_gcal', # Event Management Sync with Google Calendar
'simpleforum', # Messages ( Forum )
'location_field', # custom location field used in Event Management
'scoremanager', # manager of scores, repertoire etc.
# 'imagestore',
# 'sorl.thumbnail',
# 'tagging'
)
IMAGESTORE_TEMPLATE = "website/base.html"
IMAGESTORE_TEMPLATE = "website/base.html"
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',),
'PAGINATE_BY': 10
}
GCAL_COUPLING = {
'eventPrefix' : 'Blechreiz: ',
'developerKey' : 'blechreiz-homepage',
'clientId' : '34462582242-4kpdvvbi27ajt4u22uitqurpve9o8ipj.apps.googleusercontent.com',
'client_secret' : 'y4t9XBrJdCODPTO5UvtONWWn',
'credentials_file' : PROJECT_PATH + '/calendarCredentials.dat',
'push_url' : "https://blechreiz.bauer.technology/eventplanner_gcal/gcalApiCallback",
'eventPrefix': 'Blechreiz: ',
'developerKey': 'blechreiz-homepage',
'clientId': '34462582242-4kpdvvbi27ajt4u22uitqurpve9o8ipj.apps.googleusercontent.com',
'client_secret': 'y4t9XBrJdCODPTO5UvtONWWn',
'credentials_file': PROJECT_PATH + '/calendarCredentials.dat',
'push_url': "https://blechreiz.bauer.technology/eventplanner_gcal/gcalApiCallback",
}
CRISPY_TEMPLATE_PACK = 'bootstrap'
# A sample logging configuration. The only tangible logging
@@ -198,6 +193,16 @@ CRISPY_TEMPLATE_PACK = 'bootstrap'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '{levelname} {asctime} {module} {message}',
'style': '{',
},
'simple': {
'format': '{levelname} {asctime} {message}',
'style': '{',
},
},
'handlers': {
'file': {
'level': 'DEBUG',
@@ -211,12 +216,13 @@ LOGGING = {
'level': 'DEBUG',
'propagate': True,
},
'eventplanner': {
'eventplanner': {
'handler': ['file'],
'level': 'DEBUG',
'propagate': True,
}
}
},
}
GOOGLE_MAPS_API_KEY = 'AIzaSyCf9Lm5ckjmVd08scTOd7fB1dC_UCoumKg'