| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450 |
- """
- Django settings for MAB18_site 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 %}
- <div class="mab-card card border-thin border-0 rounded-0" style="">
- <a href="https://www.mediaarchitecture.org">
- <div style="position: relative;text-align: center;">
- <img class="card-img-top rounded-0" src="{% static 'logo_MAI.jpg' %}" style=" " alt="image">
- </div>
- </a>
- <div class="card-body" style="padding: 5px">
- <div class="border-0 d-flex justify-content">
- <p class="card-title"><a href="{% static 'MAB2018logo.png' %}">MAI<br>MAI Sponsor - YEAR, CITY, COUNTRY<br></a></p>
- </div>
- <p class="card-text" style="color: black; margin-top:0px">
- <a href="https://www.mediaarchitecture.org">
- <nobr>
- <button class="border-thin mybtn" style="margin-right: 2px;margin-bottom: 2px">#MAB</button>
- </nobr>
- </a>
- <a href="">
- <nobr>
- <button class="border-thin mybtn" style="margin-right: 2px;margin-bottom: 2px">#Sponsor</button>
- </nobr>
- </a>
- <a href="https://www.mediaarchitecture.org">
- <nobr>
- <button class="border-thin mybtn" style="margin-right: 2px;margin-bottom: 2px">#NAME</button>
- </nobr>
- </a>
- </p>
- </div>
- </div>
- """
- ABOUT_TEXT = """
- {% load static %}
- <div class="container" style="margin-top: 20px;">
- <h3>MAB Catalogue</h3>
- <br />
- <p> </p>
- <p><small> <strong>Our Sponsors:</strong><br /> -<br /> </small></p>
- <p><small> <strong>Exhibition curators</strong><br />-<br /> </small></p>
- <p><small> <strong>System developer</strong><br /> -<br /> </small></p>
- <p><small> <strong>This is a website by </strong><br /> <img src="{% static 'logo_MAI.jpg' %}" width="auto" height="50px" /><br /> Gisela Legath-Gasse 5 / 1<br /> 1220 Vienna – Austria<br /> <a href="www.mediaarchitecture.org">www.mediaarchitecture.org</a><br /> awards@mediaarchitecture.org<br /> ZVR-Zahl: 501926485<br /> ATU69058814<br /><br /> Please have a look at our privacy policy: <br /> <a href="https://www.mediaarchitecture.org/privacy-policy/">https://www.mediaarchitecture.org/privacy-policy/</a><br /> </small></p>
- </div>
- """
- MAIN_CARD = """
- {% load static %}
- <div class="card rounded-0 border-0" style="width: 97%; height: 95%; display:inline-block; margin-top:4px; max-width: 100%">
- <a href="">
- <div style="position: relative;text-align: center;">
- <img class="card-img-top rounded-0" src="{% static 'MAB_logo.png' %}" alt="image">
- <div style="position: absolute;bottom: 8px;left: 16px;color: white; font-size: medium; font-weight: bold; text-align: left;background-color: rgba(0,0,0,0.21)">Title</div>
- </div>
- </a>
- <div class="card-body" style="padding: 5px">
- <div class="border-0 d-flex justify-content">
- <p class="card-title" style="margin-bottom: 3px"><a href=""> Header </a></p>
- </div>
- <p class="card-text" style="color: black;margin-top: 0px">
- <button id='' class="border-thin mybtn" style="">Tag A</button>
- <button id='' class="border-thin mybtn" style="">Tag B</button>
- <button id='' class="border-thin mybtn" style="">Tag C</button>
- </p>
- </div>
- </div>
- """
- INFO_TXT = """
- <div><span style="font-weight: bold;">Please note:</span></div>
- <ul><li><div>Fill in as <span style="font-weight: bold;">many fields</span> as possible.</div></li>
- <li><div><span style="font-weight: bold;">Mandatory fields</span> are marked with an asterisk*.</div></li>
- <li><div>Don’t forget to press the <span style="font-weight: bold;">„Save“ button</span> from time to time ;-)</div></li>
- <li><div>Feel free to <span style="font-weight: bold;">share this form</span> within your team and partners, so that they can add additional information. (They have to use the same login as you)</div></li>
- <li><div><span style="font-weight: bold;">Please note that you can edit all entries until the deadline</span></div></li>
- <li><div><span style="font-weight: bold;">The deadline is June 14 2020 at 10:00 pm</span></div></li></ul>
- <div><span style="font-weight: bold;">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.</span></div>
- <div><br></div><div><span style="font-weight: bold;">So, have fun! </span>
- <span style="font-weight: bold;">We really look forward to your project!</span></div>
- <div><span style="font-weight: bold;">Hopefully see you in Amsterdam,</span></div>
- <div><span style="font-weight: bold;">Gernot and the MAB Team!</span></div>
- """
- SUBMIT_TEXT = """
- <div>Yes you got it! On this page you can submit proposals to the MAB20 Awards!</div><div><br></div>
- <div>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.</div>
- <div><br></div><div>In order to submit projects to the MAB Awards pls proceed as follows:</div>
- <div><br></div><ol><li><div style="text-align: left;"><span style="font-size: 14px; text-decoration: underline;">download the MAB Awards Call (PDF)</span></div>
- </li><li><div style="text-align: left;"><a href="/mab/register/">register</a></div></li>
- <li><div style="text-align: left;"><a href="/mab/addProject/?">submit your project </a></div></li></ol>
- <div style="margin-top: 1em; margin-bottom: 1em;"></div><div style="margin-top: 1em; margin-bottom: 1em;"></div>
- <div>You can invite your team and partners to fill in the project form. (They have to use the same login as you)</div>
- <div>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.</div>
- <div><span style="font-weight: bold;">The deadline is June 14 2020 at 10:00 pm</span></div><div><br>
- </div><div>So, have fun! We really look forward to your project!</div><div>Hopefully see you in Amsterdam,</div>
- <div>Gernot and the MAB Team!</div><div><br></div><div style="margin-top: 1em; margin-bottom: 1em;"></div>
- <div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">JURY MEMBERS:</span>
- </div><div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">Martijn de Waal</span><span data-en-paragraph="true" data-en-has-metadata="true"> – University of Applied Sciences, Amsterdam</span></div>
- <div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true">
- <span style="font-weight: bold;">Gernot Tscherteu</span> - Media Architecture Institute, Vienna</span></div>
- <div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">Juan Carlos Carvajal B.</span><span data-en-paragraph="true" data-en-has-metadata="true"> – </span><span data-en-paragraph="true" data-en-has-metadata="true">Media Architecture Institute, Vienna</span></div><div style="margin-top: 1em; margin-bottom: 1em;">
- <span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">Susa Pop</span><span data-en-paragraph="true" data-en-has-metadata="true"> – Public Art Lab, Berlin
- </span></div><div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">Tanya Toft Ag</span><span data-en-paragraph="true" data-en-has-metadata="true"> – Urban Media Art Academy, Hong Kong
- </span></div><div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">Luke Hespanhol</span><span data-en-paragraph="true" data-en-has-metadata="true"> – The University of Sydney, Sydney
- </span></div><div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">Ava Fatah gen. Schieck</span><span data-en-paragraph="true" data-en-has-metadata="true"> – The Bartlett, University College London
- </span></div><div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">Dave Colangelo</span><span data-en-paragraph="true" data-en-has-metadata="true"> – Portland State University, Portland
- </span></div><div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">Martin Tomitsch</span><span data-en-paragraph="true" data-en-has-metadata="true"> – The University of Sydney, Sydney
- </span></div><div style="margin-top: 1em; margin-bottom: 1em;"><span data-en-paragraph="true" data-en-has-metadata="true" style="font-weight: bold;">M. Hank Haeusler</span><span data-en-paragraph="true" data-en-has-metadata="true"> – UNSW Sydney
- </span></div><div style="margin-top: 1em; margin-bottom: 1em;"><br></div><div style="margin-top: 1em; margin-bottom: 1em;"><span style="font-weight: bold;">We would like to thank our sponsors:</span></div><div style="margin-top: 1em; margin-bottom: 1em;"><br></div><div style="margin-top: 1em; margin-bottom: 1em;"><span style="font-weight: bold;">Sponsors</span></div>
- <div style="margin-top: 1em; margin-bottom: 1em;"><br></div>
- </div>
- """
- 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'),
- }
- # Application definition
- INSTALLED_APPS = [
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'jurysys.apps.jurysysConfig',
- '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 = 'MAB18_site.urls'
- TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [os.path.join(PACKAGE_ROOT, "templates"),'./templates','./MAB18_site', ],
- '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 = 'MAB18_site.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
|