X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fsettings.py;h=68837b3d16297b28228dd845befa413be0852f8a;hb=e1a8a7db780c8250cfe36aa374d6f633653b6a08;hp=df656dec951abc631c0ec3f1740f13d811fb4fca;hpb=eb6db921938c72c0655ca2e381818a471f99f5fa;p=patchwork diff --git a/apps/settings.py b/apps/settings.py index df656de..68837b3 100644 --- a/apps/settings.py +++ b/apps/settings.py @@ -9,7 +9,7 @@ ADMINS = ( MANAGERS = ADMINS -DATABASE_ENGINE = 'postgresql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. +DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_NAME = 'patchwork' # Or path to database file if using sqlite3. DATABASE_USER = '' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. @@ -62,11 +62,13 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', ) ROOT_URLCONF = 'apps.urls' -LOGIN_URL = '/patchwork/login' +LOGIN_URL = '/accounts/login' +LOGIN_REDIRECT_URL = '/user/' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". @@ -89,7 +91,23 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.admin', 'patchwork', + 'registration', ) DEFAULT_PATCHES_PER_PAGE = 100 -PATCHWORK_FROM_EMAIL = 'Patchwork ' +DEFAULT_FROM_EMAIL = 'Patchwork ' + +ACCOUNT_ACTIVATION_DAYS = 7 + +# Set to True to enable the Patchwork XML-RPC interface +ENABLE_XMLRPC = False + +try: + from local_settings import * +except ImportError, ex: + import sys + sys.stderr.write(\ + ("settings.py: error importing local settings file:\n" + \ + "\t%s\n" + \ + "Do you have a local_settings.py module?\n") % str(ex)) + raise