# HG changeset patch # User Tero Marttila # Date 1412422562 -10800 # Node ID 6698dabcc425ed5f657b9281250f81f30bff5cb4 # Parent 4ca68e4eb386936ead71d846b8d5117c430531c8 qmsk_pngtile: django project for pngtile.qmsk.net diff -r 4ca68e4eb386 -r 6698dabcc425 qmsk_pngtile/settings/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qmsk_pngtile/settings/__init__.py Sat Oct 04 14:36:02 2014 +0300 @@ -0,0 +1,17 @@ +""" + Django settings for qmsk_pngtile project. + + For more information on this file, see + https://docs.djangoproject.com/en/1.7/topics/settings/ + + For the full list of settings and their values, see + https://docs.djangoproject.com/en/1.7/ref/settings/ +""" + +from qmsk_pngtile.settings.project import * +from qmsk_pngtile.settings.pngtile import * + +try: + from qmsk_pngtile.settings.production import * +except ImportError: + from qmsk_pngtile.settings.development import * diff -r 4ca68e4eb386 -r 6698dabcc425 qmsk_pngtile/settings/development.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qmsk_pngtile/settings/development.py Sat Oct 04 14:36:02 2014 +0300 @@ -0,0 +1,40 @@ +# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +TEMPLATE_DEBUG = True + +ALLOWED_HOSTS = [] + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '&e#@fir!k-*w(=0$@j&0guyv8qq*mh7_55j6w@2=hm0x9^ya-2' + +## Database +# https://docs.djangoproject.com/en/1.7/ref/settings/#databases +DATABASES = { + +} + +## Logging +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'formatters': { + 'qmsk': { + 'format': '[%(levelname)5s] %(module)20s:%(funcName)-20s : %(message)s', + }, + }, + 'handlers': { + 'console': { + 'level': 'DEBUG', + 'class': 'logging.StreamHandler', + 'formatter': 'qmsk', + }, + }, + 'loggers': { + + }, +} + + diff -r 4ca68e4eb386 -r 6698dabcc425 qmsk_pngtile/settings/pngtile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qmsk_pngtile/settings/pngtile.py Sat Oct 04 14:36:02 2014 +0300 @@ -0,0 +1,4 @@ +## Settings for qmsk.pngtile + +QMSK_PNGTILE_ROOT = '/srv/pngtile' +QMSK_PNGTILE_SERVER = 'http://0.pngtile.qmsk.net/' diff -r 4ca68e4eb386 -r 6698dabcc425 qmsk_pngtile/settings/project.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qmsk_pngtile/settings/project.py Sat Oct 04 14:36:02 2014 +0300 @@ -0,0 +1,50 @@ +## Settings for qmsk_pngtile project + +# Application definition +INSTALLED_APPS = ( + 'django.contrib.staticfiles', + + 'qmsk.pngtile', +) + +MIDDLEWARE_CLASSES = ( + +) + +ROOT_URLCONF = 'qmsk_pngtile.urls' + +WSGI_APPLICATION = 'qmsk_pngtile.wsgi.application' + +## Internationalization +# https://docs.djangoproject.com/en/1.7/topics/i18n/ +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + +## Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.7/howto/static-files/ +STATIC_URL = '/static/' + +STATICFILES_DIRS = ( + # django project files + './qmsk_pngtile/static', + + # shared between django projects + './static', +) + +## Site templates +TEMPLATE_DIRS = ( + # django project files + './qmsk_pngtile/templates', + + # shared between django projects + './templates', +) + diff -r 4ca68e4eb386 -r 6698dabcc425 qmsk_pngtile/urls.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qmsk_pngtile/urls.py Sat Oct 04 14:36:02 2014 +0300 @@ -0,0 +1,13 @@ +from django.conf.urls import patterns, include, url + +urlpatterns = patterns('', + # Examples: + url(r'^', include('qmsk.pngtile.urls')), +) + +if False: + from django.contrib import admin + + urlpatterns += patterns('', + url(r'^admin/', include(admin.site.urls)), + ) diff -r 4ca68e4eb386 -r 6698dabcc425 qmsk_pngtile/wsgi.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qmsk_pngtile/wsgi.py Sat Oct 04 14:36:02 2014 +0300 @@ -0,0 +1,14 @@ +""" +WSGI config for qmsk_pngtile project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ +""" + +import os +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "qmsk_pngtile.settings") + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application()