""" Django settings for project_base project. Generated by 'django-admin startproject' using Django 2.0.7. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os from django.utils.translation import ugettext_lazy as _ try: from .settings_local import * except: pass # SECURITY WARNING: don't run with debug turned on in production! try: os.environ['django_DEBUG'] if os.environ['django_DEBUG'] == 'True': DEBUG = True else: DEBUG = False except KeyError: DEBUG = True # Build paths inside the project like this: os.path.join(BASE_DIR, ...) PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ #STATIC_URL = "https://cdn.awards.mediaarchitecture.org/site_media/static/" #MEDIA_URL = "https://cdn.awards.mediaarchitecture.org/site_media/media/" STATIC_ROOT = os.path.join(PROJECT_ROOT, "site_media", "static") MEDIA_ROOT = os.path.join(PROJECT_ROOT, "site_media", "media") try: os.environ['django_MEDIA_URL'] MEDIA_URL = os.environ['django_MEDIA_URL'] except: MEDIA_URL = '/site_media/media/' try: os.environ['django_STATIC_URL'] STATIC_URL = os.environ['django_STATIC_URL'] except: STATIC_URL = '/site_media/static/' try: os.environ['django_IMPORT_PATH'] IMPORT_PATH = os.environ['django_IMPORT_PATH'] except KeyError: IMPORT_PATH = '/' try: os.environ['django_OLD_IMPORT_PATH'] OLD_IMPORT_PATH = os.environ['django_OLD_IMPORT_PATH'] except KeyError: OLD_IMPORT_PATH = '/' try: os.environ['django_TEMP_PATH'] TEMP_PATH = os.environ['django_TEMP_PATH'] except KeyError: TEMP_PATH = '/' # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! try: os.environ['django_SECRET_KEY'] SECRET_KEY = os.environ['django_SECRET_KEY'] except KeyError: SECRET_KEY = 'KsN_QZ_fWqs18Z-3o}2~z0-@NA+/lP{YwVosC>6:Gxbu>ePUw=+Gv6lIZWR' try: os.environ['django_ALLOWED_HOSTS'] ENV_ALLOWED_HOSTS = os.environ['django_ALLOWED_HOSTS'] ALLOWED_HOSTS = [] ALLOWED_HOSTS.extend( ENV_ALLOWED_HOSTS.split() ) except KeyError: ALLOWED_HOSTS = ['*'] #if DEBUG == True: # ALLOWED_HOSTS = ['*'] #else: # ALLOWED_HOSTS = ['awards.mediaarchitecture.org', 'devawards.mediaarchitecture.org', 'devcatalog.mediaarchitecture.org' 'catalog.mediaarchitecture.org', 'localhost'] # Constance settings SPONSOR_CARDS = """ {% load static %}
image

""" ABOUT_TEXT = """ {% load static %}

MAB Catalogue


 

Our Sponsors:
-

Exhibition curators
-

System developer
-

This is a website by

Gisela Legath-Gasse 5 / 1
1220 Vienna – Austria
www.mediaarchitecture.org
awards@mediaarchitecture.org
ZVR-Zahl: 501926485
ATU69058814

Please have a look at our privacy policy:
https://www.mediaarchitecture.org/privacy-policy/

""" MAIN_CARD = """ {% load static %}
image
Title

""" INFO_TXT = """
Please note:
After the deadline we take what is in the form. So make sure that least all required fields are filled in and you have added at least 4 media (Photos or Videos) You can only add media after you have entered all mandatory fields.

So, have fun!  We really look forward to your project!
Hopefully see you in Amsterdam,
Gernot and the MAB Team!
""" SUBMIT_TEXT = """
Yes you got it! On this page you can submit proposals to the MAB20 Awards!

We are pleased to announce that the international Media Architecture Biennale 2020, will take place 23 · 27 November 2020 in Amsterdam / Utrecht in the Netherlands.

In order to submit projects to the MAB Awards pls proceed as follows:

  1. download the MAB Awards Call (PDF)
  2. register
  3. submit your project 
You can invite your team and partners to fill in the project form. (They have to use the same login as you)
It’s work in progress. ;.-) You don’t have to fill in everything at one time and you can edit all entries until the deadline.
The deadline is  June 14 2020 at 10:00 pm

So, have fun! We really look forward to your project!
Hopefully see you in Amsterdam,
Gernot and the MAB Team!

JURY MEMBERS:
Martijn de Waal – University of Applied Sciences, Amsterdam
Gernot Tscherteu - Media Architecture Institute, Vienna
Juan Carlos Carvajal B. – Media Architecture Institute, Vienna
Susa Pop – Public Art Lab, Berlin
Tanya Toft Ag – Urban Media Art Academy, Hong Kong
Luke Hespanhol – The University of Sydney, Sydney
Ava Fatah gen. Schieck – The Bartlett, University College London
Dave Colangelo – Portland State University, Portland
Martin Tomitsch – The University of Sydney, Sydney
M. Hank Haeusler – UNSW Sydney

We would like to thank our sponsors:

Sponsors

""" CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend' CONSTANCE_CONFIG = { 'ABOUT_CONTENT': (ABOUT_TEXT, 'Text for the about page'), 'SPONSOR_CARDS': (SPONSOR_CARDS, 'HTML for the sponsor cards'), 'MAIN_CARD': (MAIN_CARD, 'HTML for the main card'), 'CURRENT_EVENT': ('MAB20', 'Filter for the projects that should be evaluated'), 'INFO_TXT': (INFO_TXT, 'Text to help with the fill in the submitform'), 'SUBMIT_TEXT': (SUBMIT_TEXT, 'Text to welcome to the submitpage'), 'ADMIN_EMAIL': ('juan@mediaarchitecture.org', 'Admin email'), } # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'marktplatz', 'constance', 'constance.backends.database', 'imagekit', 'crispy_forms', 'django_file_form', 'django_file_form.ajaxuploader', 'django_countries', 'captcha', ] CRISPY_TEMPLATE_PACK = 'bootstrap4' CAPTCHA_NOISE_FUNCTIONS=('captcha.helpers.noise_dots',) CAPTCHA_LETTER_ROTATION=(-15,15) 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', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] # 'htmlmin.middleware.HtmlMinifyMiddleware', # 'htmlmin.middleware.MarkRequestMiddleware', ROOT_URLCONF = 'project_base.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(PACKAGE_ROOT, "templates"),'./templates','./project_base', ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'constance.context_processors.config', 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'project_base.wsgi.application' EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' LOGIN_REDIRECT_URL = '/mab/home/' # Database # https://docs.djangoproject.com/en/2.0/ref/settings/#databases try: os.environ['django_DB_ENGINE'] DB_ENGINE = os.environ['django_DB_ENGINE'] except KeyError: DB_ENGINE = 'django.db.backends.sqlite3' try: os.environ['django_DB_NAME'] DB_NAME = os.environ['django_DB_NAME'] except KeyError: DB_NAME = os.path.join(BASE_DIR, 'db.sqlite3') try: os.environ['django_DB_USER'] DB_USER = os.environ['django_DB_USER'] except KeyError: DB_USER = '' try: os.environ['django_DB_PASSWORD'] DB_PASSWORD = os.environ['django_DB_PASSWORD'] except KeyError: DB_PASSWORD = '' try: os.environ['django_DB_HOST'] DB_HOST = os.environ['django_DB_HOST'] except KeyError: DB_HOST = '' try: os.environ['django_DB_PORT'] DB_PORT = os.environ['django_DB_PORT'] except KeyError: DB_PORT = '' if DB_ENGINE == "django.db.backends.mysql" : DB_OPTIONS = {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"} else: DB_OPTIONS = {} DATABASES = { "default": { "ENGINE": DB_ENGINE, "NAME": DB_NAME, "USER": DB_USER, "PASSWORD": DB_PASSWORD, "HOST": DB_HOST, "PORT": DB_PORT, "OPTIONS" : DB_OPTIONS } } # Password validation # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/2.0/topics/i18n/ LANGUAGE_CODE = 'en-us' # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # On Unix systems, a value of None will cause Django to use the same # timezone as the operating system. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = "Europe/Vienna" USE_I18N = True USE_L10N = True USE_TZ = True #MAIL try: os.environ['django_DEFAULT_FROM_EMAIL'] DEFAULT_FROM_EMAIL = os.environ['django_DEFAULT_FROM_EMAIL'] except: DEFAULT_FROM_EMAIL = 'webmaster@localhost' try: os.environ['django_EMAIL_BACKEND'] EMAIL_BACKEND = os.environ['django_EMAIL_BACKEND'] except KeyError: EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" try: os.environ['django_EMAIL_HOST'] EMAIL_HOST = os.environ['django_EMAIL_HOST'] except KeyError: EMAIL_HOST = '' try: os.environ['django_EMAIL_HOST_USER'] EMAIL_HOST_USER = os.environ['django_EMAIL_HOST_USER'] except: EMAIL_HOST_USER = '' try: os.environ['django_EMAIL_HOST_PASSWORD'] EMAIL_HOST_PASSWORD = os.environ['django_EMAIL_HOST_PASSWORD'] except KeyError: EMAIL_HOST_PASSWORD = '' try: os.environ['django_EMAIL_PORT'] EMAIL_PORT = os.environ['django_EMAIL_PORT'] except KeyError: EMAIL_PORT = '' try: os.environ['django_EMAIL_USE_SSL'] if os.environ['django_EMAIL_USE_SSL'] == 'True' : EMAIL_USE_SSL = True else: EMAIL_USE_SSL = False except KeyError: EMAIL_USE_SSL = False