diff options
Diffstat (limited to 'example_project/settings.py.example')
| -rw-r--r-- | example_project/settings.py.example | 50 | 
1 files changed, 50 insertions, 0 deletions
diff --git a/example_project/settings.py.example b/example_project/settings.py.example index 2715d02..c9a3934 100644 --- a/example_project/settings.py.example +++ b/example_project/settings.py.example @@ -10,6 +10,7 @@ ROOT_PATH = os.path.realpath(os.path.dirname(__file__)) + "/"  EXTRA_URL = 'chimere/'  BASE_URL = SERVER_URL + EXTRA_URL  EMAIL_HOST = 'localhost' +STATIC_URL = '/static/'  TINYMCE_URL = 'http://localhost/tinymce/'  JQUERY_URL = "/chimere/static/jquery/jquery-1.4.4.min.js" @@ -147,6 +148,7 @@ INSTALLED_APPS = (      'django.contrib.contenttypes',      'django.contrib.sessions',      'django.contrib.sites', +    'django.contrib.staticfiles',      'south',      'chimere',      # activate it if you want to use migration scripts @@ -157,3 +159,51 @@ INSTALLED_APPS = (  if 'chimere_rss' in INSTALLED_APPS:      TEMPLATE_DIRS.append(ROOT_PATH + 'chimere_rss/templates') + +LOGGING = {'version': 1, +     'disable_existing_loggers': False, +    'handlers': { +        /# Include the default Django email handler for errors +        # This is what you'd get without configuring logging at all. +        'mail_admins': { +            'class': 'django.utils.log.AdminEmailHandler', +            'level': 'ERROR', +            # But the emails are plain text by default - HTML is nicer +            'include_html': True, +        }, +        # Log to a text file that can be rotated by logrotate +        'logfile': { +            'class': 'logging.handlers.WatchedFileHandler', +            'filename': '/var/log/django/chimere.log' +        }, +    }, +    'loggers': { +        # Again, default Django configuration to email unhandled exceptions +        'django.request': { +            'handlers': ['mail_admins'], +            'level': 'ERROR', +            'propagate': True, +        }, +        # Might as well log any errors anywhere else in Django +        'django': { +            'handlers': ['logfile'], +            'level': 'ERROR', +            'propagate': False, +        }, +        # Your own app - this assumes all your logger names start with "myapp." +        'main': { +            'handlers': ['logfile'], +            'level': 'WARNING', # Or maybe INFO or DEBUG +                'propogate': False +        }, +    }, +} + +TEMPLATE_CONTEXT_PROCESSORS = ( +    'django.core.context_processors.debug', +    'django.core.context_processors.i18n', +    'django.core.context_processors.media', +    'django.core.context_processors.static', +    'django.contrib.auth.context_processors.auth', +    'django.contrib.messages.context_processors.messages', +)  | 
