Permalink
Browse files

Cleaning up the settings file a bit. Removed the SECRET_KEY. Enabled …

…messages. Fixed django admin_media path. LOGGING.
  • Loading branch information...
1 parent a5d70b9 commit 831f55efcf119bc2037cb31055dfde76938efe37 @ktonon ktonon committed Aug 22, 2011
Showing with 30 additions and 8 deletions.
  1. +28 −4 mingus/settings.py
  2. +2 −4 mingus/urls.py
View
@@ -4,7 +4,7 @@
PROJECT_ROOT = os.path.dirname(__file__)
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
MEDIA_URL = '/media/'
-ADMIN_MEDIA_PREFIX = '/admin_media/'
+ADMIN_MEDIA_PREFIX = '/static/admin/'
#staticfiles app values
STATIC_URL = '/static/'
@@ -18,8 +18,7 @@
SITE_ID = 1
ROOT_URLCONF = 'mingus.urls'
-TIME_ZONE = 'America/New_York'
-SECRET_KEY = '+bq@o(jph^-*sfj4j%xukecxb0jae9lci&ysy=609hj@(l$47c'
+TIME_ZONE = 'America/Chicago'
USE_I18N = False
HONEYPOT_FIELD_NAME = 'fonzie_kungfu'
@@ -39,6 +38,7 @@
'djangodblog.DBLogMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
@@ -56,11 +56,12 @@
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.sitemaps',
'django.contrib.flatpages',
'django.contrib.redirects',
- 'django.contrib.staticfiles',
'django_extensions',
'tagging',
@@ -109,6 +110,29 @@
DJANGO_WYSIWYG_MEDIA_URL = STATIC_URL + "js/ckeditor/"
DJANGO_WYSIWYG_FLAVOR = "ckeditor"
+# 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': False,
+ 'handlers': {
+ 'mail_admins': {
+ 'level': 'ERROR',
+ 'class': 'django.utils.log.AdminEmailHandler'
+ }
+ },
+ 'loggers': {
+ 'django.request': {
+ 'handlers': ['mail_admins'],
+ 'level': 'ERROR',
+ 'propagate': True,
+ },
+ }
+}
+
try:
from local_settings import *
except ImportError:
View
@@ -1,5 +1,6 @@
from django.conf.urls.defaults import *
from django.contrib import admin
+from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.simple import direct_to_template
from django.conf import settings
from basic.blog import views as blog_views
@@ -80,7 +81,4 @@
from django.conf import settings
if settings.DEBUG:
- urlpatterns += patterns('',
- (r'', include('staticfiles.urls')),
- )
-
+ urlpatterns += staticfiles_urlpatterns()

0 comments on commit 831f55e

Please sign in to comment.