projects
/
matthijs
/
projects
/
xerxes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Add a message to the login screen.
[matthijs/projects/xerxes.git]
/
settings.py
diff --git
a/settings.py
b/settings.py
index 574b39536a5f8e786d04a1e3f23ab18bed5b493c..ba3582d320d897fbe6efcfa3e3004da143b456fa 100644
(file)
--- a/
settings.py
+++ b/
settings.py
@@
-1,6
+1,9
@@
# Django settings for ee project.
from dbsettings import *
# Django settings for ee project.
from dbsettings import *
+import os
+
+PROJECT_DIR = os.path.dirname(__file__)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@
-11,7
+14,6
@@
ADMINS = (
MANAGERS = ADMINS
MANAGERS = ADMINS
-PHPBB_DATABASE_NAME = 'ee_forum'
# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
@@
-23,7
+25,12
@@
TIME_ZONE = 'Europe/Amsterdam'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
-LANGUAGE_CODE = 'en-us'
+#LANGUAGE_CODE = 'en-us'
+LANGUAGE_CODE = 'nl'
+LANGUAGES = (
+ ('nl', 'Nederlands'),
+ ('en', 'English'),
+)
SITE_ID = 1
SITE_ID = 1
@@
-39,6
+46,10
@@
MEDIA_ROOT = ''
# Example: "http://media.lawrence.com"
MEDIA_URL = ''
# Example: "http://media.lawrence.com"
MEDIA_URL = ''
+# URL prefix for static files. Will be made available by
+# ee.tools.context_processors.static
+STATIC_URL_PREFIX = '/static/'
+
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
@@
-59,6
+70,9
@@
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
+ # Let's keep this disabled (until we can offer language selection to
+ # users).
+ #'django.middleware.locale.LocaleMiddleware',
)
ROOT_URLCONF = 'ee.urls'
)
ROOT_URLCONF = 'ee.urls'
@@
-67,7
+81,7
@@
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
-
'/home/matthijs/docs/src/django/ee/templates'
,
+
os.path.join(PROJECT_DIR, 'templates')
,
)
INSTALLED_APPS = (
)
INSTALLED_APPS = (
@@
-76,15
+90,28
@@
INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
- 'ee.events',
- 'ee.influences',
- 'ee.base',
+ 'ee.events',
+ 'ee.influences',
+ 'ee.base',
+ 'ee.tools',
)
TEMPLATE_CONTEXT_PROCESSORS = (
)
TEMPLATE_CONTEXT_PROCESSORS = (
- "django.core.context_processors.auth",
- "django.core.context_processors.debug",
- "django.core.context_processors.i18n",
+ "django.core.context_processors.auth",
+ "django.core.context_processors.debug",
+ "django.core.context_processors.i18n",
+ # Add STATIC_URL_PREFIX to the context
+ "ee.tools.context_processors.static",
)
LOGIN_URL = "/accounts/login/"
)
LOGIN_URL = "/accounts/login/"
+LOGIN_REDIRECT_URL = "/influences/"
+
+# Allow authentication against the phpb user accounts
+
+AUTHENTICATION_BACKENDS = (
+ 'ee.auth.PhpBBBackend',
+ 'django.contrib.auth.backends.ModelBackend',
+)
+
+AUTH_PROFILE_MODULE = 'base.UserProfile'