neue Verzeichnissstruktur
6
.gitignore
vendored
@@ -1,3 +1,9 @@
|
||||
*.pyc
|
||||
htdocs/media/
|
||||
media/
|
||||
.gitignore
|
||||
.idea/
|
||||
.project
|
||||
.pydevproject
|
||||
.settings/
|
||||
*~
|
||||
|
||||
23
.idea/dataSources.xml
generated
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" hash="2432422747">
|
||||
<data-source source="LOCAL" name="Django default" uuid="a29ad8e2-43fc-4dcd-9c40-475535292b4b">
|
||||
<driver-ref>mysql</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mariadb://127.0.0.1/kasu</jdbc-url>
|
||||
<driver-properties>
|
||||
<property name="zeroDateTimeBehavior" value="convertToNull" />
|
||||
<property name="tinyInt1isBit" value="false" />
|
||||
<property name="characterEncoding" value="utf8" />
|
||||
<property name="characterSetResults" value="utf8" />
|
||||
<property name="yearIsDateType" value="false" />
|
||||
</driver-properties>
|
||||
<libraries>
|
||||
<library>
|
||||
<url>file:///usr/share/java/mariadb-jdbc/mariadb-java-client.jar</url>
|
||||
</library>
|
||||
</libraries>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
||||
4
.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
|
||||
</project>
|
||||
18
.idea/kasu.iml
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="django" name="Django">
|
||||
<configuration>
|
||||
<option name="rootFolder" value="$MODULE_DIR$/src" />
|
||||
<option name="settingsModule" value="settings.py" />
|
||||
<option name="manageScript" value="manage.py" />
|
||||
<option name="environment" value="<map/>" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
4
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7.5 (/usr/bin/python2.7)" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/kasu.iml" filepath="$PROJECT_DIR$/.idea/kasu.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
5
.idea/scopes/scope_settings.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<state>
|
||||
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
||||
</state>
|
||||
</component>
|
||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -2,11 +2,7 @@ from os import path
|
||||
from django.template.defaultfilters import slugify
|
||||
|
||||
gettext = lambda s: s
|
||||
|
||||
DEBUG = False
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
PROJECT_PATH = path.abspath(path.join(path.dirname(__file__), '..'))
|
||||
|
||||
PROJECT_PATH = path.abspath(path.join(path.dirname(__file__), '..', '..'))
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'grappelli',
|
||||
@@ -40,7 +36,7 @@ EMAIL_USE_TLS = True
|
||||
DEFAULT_FROM_EMAIL = "webmaster@kasu.at"
|
||||
|
||||
|
||||
LOCALE_PATHS = (path.join(PROJECT_PATH, 'src', 'locale/'),)
|
||||
LOCALE_PATHS = (path.join(PROJECT_PATH, 'kasu', 'locale/'),)
|
||||
AUTH_PROFILE_MODULE = 'membership.Membership'
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
@@ -96,7 +92,7 @@ USE_L10N = True
|
||||
|
||||
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
||||
# Example: "/home/media/media.lawrence.com/media/"
|
||||
MEDIA_ROOT = path.join(PROJECT_PATH, 'htdocs', 'media')
|
||||
MEDIA_ROOT = path.join(PROJECT_PATH, 'media')
|
||||
|
||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||
# trailing slash.
|
||||
@@ -108,7 +104,7 @@ MEDIA_URL = '/media/'
|
||||
# Don't put anything in this directory yourself; store your static files
|
||||
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||
# Example: "/home/media/media.lawrence.com/static/"
|
||||
STATIC_ROOT = path.join(PROJECT_PATH, 'htdocs')
|
||||
STATIC_ROOT = path.join(PROJECT_PATH, 'static')
|
||||
|
||||
# URL prefix for static files.
|
||||
# Example: "http://media.lawrence.com/static/"
|
||||
@@ -120,7 +116,7 @@ STATICFILES_DIRS = (
|
||||
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
||||
# Always use forward slashes, even on Windows.
|
||||
# Don't forget to use absolute paths, not relative paths.
|
||||
path.join(PROJECT_PATH, 'static'),
|
||||
path.join(PROJECT_PATH, 'kasu','static'),
|
||||
)
|
||||
|
||||
# List of finder classes that know how to find static files in
|
||||
@@ -142,7 +138,7 @@ MIDDLEWARE_CLASSES = [
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'urls'
|
||||
ROOT_URLCONF = 'kasu.urls'
|
||||
|
||||
# List of callables that know how to import templates from various sources.
|
||||
TEMPLATE_LOADERS = (
|
||||
@@ -171,62 +167,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
|
||||
# PREFIX_DEFAULT_LOCALE = True
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
# performed by this configuration is to send an email to
|
||||
# the site admins on every HTTP 500 error.
|
||||
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
||||
# more details on how to customize your logging configuration.
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': True,
|
||||
'filters': {
|
||||
'require_debug_false': {
|
||||
'()': 'django.utils.log.RequireDebugFalse'
|
||||
}
|
||||
},
|
||||
'formatters': {
|
||||
'verbose': {
|
||||
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' # @IgnorePep8
|
||||
},
|
||||
'simple': {
|
||||
'format': '%(levelname)s %(message)s'
|
||||
},
|
||||
},
|
||||
'handlers': {
|
||||
'null': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'django.utils.log.NullHandler',
|
||||
},
|
||||
'console': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'simple'
|
||||
},
|
||||
'mail_admins': {
|
||||
'level': 'ERROR',
|
||||
'filters': ['require_debug_false'],
|
||||
'class': 'django.utils.log.AdminEmailHandler',
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'django': {
|
||||
'handlers': ['console'],
|
||||
'level': 'INFO',
|
||||
'propagate': True,
|
||||
},
|
||||
'django.request': {
|
||||
'handlers': ['console', 'mail_admins'],
|
||||
'level': 'ERROR',
|
||||
'propagate': False,
|
||||
},
|
||||
'kasu': {
|
||||
'handlers': ['console', 'mail_admins'],
|
||||
'level': 'DEBUG',
|
||||
'propagate': False,
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
||||
@@ -264,22 +204,3 @@ SOCIAL_AUTH_TWITTER_SECRET = 'xLhz4zwAn3Lyl9MmJAiL85IurdmYzjDpoQF36du8tWg'
|
||||
SESSION_COOKIE_DOMAIN = '.kasu.at' # Die ganze Domain Kasu
|
||||
SESSION_COOKIE_AGE = 4838400 # Session dauer: 4 Wochen
|
||||
|
||||
########################################
|
||||
# Tools for the development enviroment #
|
||||
########################################
|
||||
|
||||
if DEBUG:
|
||||
# Load the Rosetta Translation Tool if available
|
||||
try:
|
||||
import rosetta # @UnusedImport
|
||||
INSTALLED_APPS.append('rosetta')
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Load the Django Debug Toolbar if installed
|
||||
try:
|
||||
import debug_toolbar # @UnusedImport
|
||||
INSTALLED_APPS.append('debug_toolbar')
|
||||
MIDDLEWARE_CLASSES.append('debug_toolbar.middleware.DebugToolbarMiddleware') # @IgnorePep8
|
||||
except ImportError:
|
||||
pass
|
||||
23
kasu/settings/dev.py
Normal file
@@ -0,0 +1,23 @@
|
||||
###########################################
|
||||
# Settings for the development enviroment #
|
||||
###########################################
|
||||
__author__ = 'Christian Berg'
|
||||
from base import *
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = True
|
||||
|
||||
# Load the Rosetta translation tool
|
||||
try:
|
||||
import rosetta # @UnusedImport
|
||||
INSTALLED_APPS.append('rosetta')
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Load the Django debug toolbar
|
||||
try:
|
||||
import debug_toolbar # @UnusedImport
|
||||
INSTALLED_APPS.append('debug_toolbar')
|
||||
MIDDLEWARE_CLASSES.append('debug_toolbar.middleware.DebugToolbarMiddleware') # @IgnorePep8
|
||||
except ImportError:
|
||||
pass
|
||||
63
kasu/settings/production.py
Normal file
@@ -0,0 +1,63 @@
|
||||
__author__ = "christian"
|
||||
from base import *
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
# performed by this configuration is to send an email to
|
||||
# the site admins on every HTTP 500 error.
|
||||
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
||||
# more details on how to customize your logging configuration.
|
||||
DEBUG = False
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': True,
|
||||
'filters': {
|
||||
'require_debug_false': {
|
||||
'()': 'django.utils.log.RequireDebugFalse'
|
||||
}
|
||||
},
|
||||
'formatters': {
|
||||
'verbose': {
|
||||
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' # @IgnorePep8
|
||||
},
|
||||
'simple': {
|
||||
'format': '%(levelname)s %(message)s'
|
||||
},
|
||||
},
|
||||
'handlers': {
|
||||
'null': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'django.utils.log.NullHandler',
|
||||
},
|
||||
'console': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'simple'
|
||||
},
|
||||
'mail_admins': {
|
||||
'level': 'ERROR',
|
||||
'filters': ['require_debug_false'],
|
||||
'class': 'django.utils.log.AdminEmailHandler',
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'django': {
|
||||
'handlers': ['console'],
|
||||
'level': 'INFO',
|
||||
'propagate': True,
|
||||
},
|
||||
'django.request': {
|
||||
'handlers': ['console', 'mail_admins'],
|
||||
'level': 'ERROR',
|
||||
'propagate': False,
|
||||
},
|
||||
'kasu': {
|
||||
'handlers': ['console', 'mail_admins'],
|
||||
'level': 'DEBUG',
|
||||
'propagate': False,
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 58 B After Width: | Height: | Size: 58 B |
|
Before Width: | Height: | Size: 75 B After Width: | Height: | Size: 75 B |
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 212 B |
|
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 844 B |
|
Before Width: | Height: | Size: 45 B After Width: | Height: | Size: 45 B |
|
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 711 B |
|
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 176 B |
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
|
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 192 B |
|
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 390 B |
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 667 B |
|
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 341 B |