Rename tixl to pretix

This commit is contained in:
Raphael Michel
2015-01-19 01:10:35 +01:00
parent fd93dcae3c
commit 6648e7ed03
107 changed files with 524 additions and 529 deletions

0
src/pretix/__init__.py Normal file
View File

159
src/pretix/settings.py Normal file
View File

@@ -0,0 +1,159 @@
"""
Django settings for pretix project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '0ro^46+8k#dv3ej=oen-2ww)i30#$$^&x&eajyj&_&h)$nc6@5'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'pretixbase',
'pretixcontrol',
'pretixpresale',
'compressor',
'bootstrap3',
'debug_toolbar.apps.DebugToolbarConfig',
'djangoformsetjs',
'pretixplugins.testdummy',
'pretixplugins.timerestriction',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
'pretixbase.middleware.LocaleMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'pretixcontrol.middleware.PermissionMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.request",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages",
'pretixcontrol.context.contextprocessor',
)
ROOT_URLCONF = 'pretix.urls'
WSGI_APPLICATION = 'pretix.wsgi.application'
# Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Internationalization
# https://docs.djangoproject.com/en/dev/topics/i18n/
LANGUAGE_CODE = 'en'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
LOCALE_PATHS = (
'locale',
)
from django.utils.translation import ugettext_lazy as _
LANGUAGES = (
('de', _('German')),
('en', _('English')),
)
# Authentication
AUTH_USER_MODEL = 'pretixbase.User'
LOGIN_URL = '/login'
LOGIN_URL_CONTROL = '/control/login'
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/dev/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = '_static'
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder',
)
COMPRESS_PRECOMPILERS = (
('text/less', 'helpers.lessabsolutefilter.LessFilter'),
)
COMPRESS_CSS_FILTERS = (
'compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.CSSMinFilter',
)
# Debug toolbar
DEBUG_TOOLBAR_PATCH_SETTINGS = False
DEBUG_TOOLBAR_CONFIG = {
'JQUERY_URL': ''
}
# Tixl specific settings
TIXL_INSTANCE_NAME = 'pretix.de'
DEFAULT_CURRENCY = 'EUR'
INTERNAL_IPS = ('127.0.0.1', '::1')
try:
from local_settings import *
except ImportError:
pass

17
src/pretix/urls.py Normal file
View File

@@ -0,0 +1,17 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings
import pretixcontrol.urls
urlpatterns = patterns('',
url(r'^control/', include(pretixcontrol.urls, namespace='control')),
url(r'^admin/', include(admin.site.urls)),
)
if settings.DEBUG:
import debug_toolbar
urlpatterns += patterns('',
url(r'^__debug__/', include(debug_toolbar.urls)),
)

14
src/pretix/wsgi.py Normal file
View File

@@ -0,0 +1,14 @@
"""
WSGI config for pretix 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/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()