Guest User

settings.py

a guest
Feb 24th, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.28 KB | None | 0 0
  1. # Django settings for stats project.
  2. #import os.path
  3.  
  4. DEBUG = True
  5. TEMPLATE_DEBUG = DEBUG
  6.  
  7. ADMINS = (
  8.     # ('Your Name', '[email protected]'),
  9. )
  10.  
  11. MANAGERS = ADMINS
  12.  
  13. DATABASES = {
  14.     'default': {
  15.         'ENGINE': 'mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  16.         'NAME': 'stats',                      # Or path to database file if using sqlite3.
  17.         'USER': 'root',                      # Not used with sqlite3.
  18.         'PASSWORD': '',                  # Not used with sqlite3.
  19.         'HOST': 'localhost',                      # Set to empty string for localhost. Not used with sqlite3.
  20.         'PORT': '3306',                      # Set to empty string for default. Not used with sqlite3.
  21.     }
  22. }
  23.  
  24. # Local time zone for this installation. Choices can be found here:
  25. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  26. # although not all choices may be available on all operating systems.
  27. # On Unix systems, a value of None will cause Django to use the same
  28. # timezone as the operating system.
  29. # If running in a Windows environment this must be set to the same as your
  30. # system time zone.
  31. TIME_ZONE = 'America/Chicago'
  32.  
  33. # Language code for this installation. All choices can be found here:
  34. # http://www.i18nguy.com/unicode/language-identifiers.html
  35. LANGUAGE_CODE = 'en-us'
  36.  
  37. SITE_ID = 1
  38.  
  39. # If you set this to False, Django will make some optimizations so as not
  40. # to load the internationalization machinery.
  41. USE_I18N = True
  42.  
  43. # If you set this to False, Django will not format dates, numbers and
  44. # calendars according to the current locale
  45. USE_L10N = True
  46.  
  47. # Absolute filesystem path to the directory that will hold user-uploaded files.
  48. # Example: "/home/media/media.lawrence.com/media/"
  49. MEDIA_ROOT = ''
  50.  
  51. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  52. # trailing slash.
  53. # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
  54. MEDIA_URL = ''
  55.  
  56. # Absolute path to the directory static files should be collected to.
  57. # Don't put anything in this directory yourself; store your static files
  58. # in apps' "static/" subdirectories and in STATICFILES_DIRS.
  59. # Example: "/home/media/media.lawrence.com/static/"
  60. STATIC_ROOT = 'D:/whitehat/Dropbox/projects/stats/sitestatic/'
  61.  
  62. # URL prefix for static files.
  63. # Example: "http://media.lawrence.com/static/"
  64. STATIC_URL = '/static/'
  65.  
  66. # URL prefix for admin static files -- CSS, JavaScript and images.
  67. # Make sure to use a trailing slash.
  68. # Examples: "http://foo.com/static/admin/", "/static/admin/".
  69. ADMIN_MEDIA_PREFIX = '/static/admin/'
  70.  
  71. # Additional locations of static files
  72. STATICFILES_DIRS = (
  73.     # Put strings here, like "/home/html/static" or "C:/www/django/static".
  74.     # Always use forward slashes, even on Windows.
  75.     # Don't forget to use absolute paths, not relative paths.
  76. )
  77.  
  78. # List of finder classes that know how to find static files in
  79. # various locations.
  80. STATICFILES_FINDERS = (
  81.     'django.contrib.staticfiles.finders.FileSystemFinder',
  82.     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  83. #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
  84. )
  85.  
  86. # Make this unique, and don't share it with anybody.
  87. SECRET_KEY = '#x&t(dxxutgqi689l%otec8qo_js@070#%3ak_a0j4ubtkaaaa'
  88.  
  89. # List of callables that know how to import templates from various sources.
  90. TEMPLATE_LOADERS = (
  91.     'django.template.loaders.filesystem.Loader',
  92.     'django.template.loaders.app_directories.Loader',
  93. #     'django.template.loaders.eggs.Loader',
  94. )
  95.  
  96. SITE_ROOT = '/'
  97. MEDIA_SERIAL_DIRS = ["admin", "djblets"]
  98.  
  99. #MEDIA_URL = getattr(settings_local, 'MEDIA_URL', SITE_ROOT + 'media/')
  100.  
  101. MIDDLEWARE_CLASSES = (
  102.     'django.middleware.common.CommonMiddleware',
  103.     'django.contrib.sessions.middleware.SessionMiddleware',
  104.     'django.middleware.csrf.CsrfViewMiddleware',
  105.     'django.contrib.auth.middleware.AuthenticationMiddleware',
  106.     'django.contrib.messages.middleware.MessageMiddleware',
  107. )
  108.  
  109. ROOT_URLCONF = 'stats.urls'
  110.  
  111. TEMPLATE_DIRS = ('D:/whitehat/Dropbox/projects/stats/templates',)
  112.  
  113. INSTALLED_APPS = (
  114.     'django.contrib.auth',
  115.     'django.contrib.contenttypes',
  116.     'django.contrib.sessions',
  117.     'django.contrib.sites',
  118.     'django.contrib.messages',
  119.     'django.contrib.staticfiles',
  120.     # Uncomment the next line to enable the admin:
  121.     'django.contrib.admin',
  122.     # Uncomment the next line to enable admin documentation:
  123.     # 'django.contrib.admindocs',
  124.     'stats.statistics',
  125.     #menus
  126.     'treemenus',
  127.     #grids
  128.     'djblets.datagrid',
  129.     'djblets.feedview',
  130.     'djblets.siteconfig',
  131.     'djblets.util',
  132.     'djblets.webapi',
  133. )
  134.  
  135. # A sample logging configuration. The only tangible logging
  136. # performed by this configuration is to send an email to
  137. # the site admins on every HTTP 500 error.
  138. # See http://docs.djangoproject.com/en/dev/topics/logging for
  139. # more details on how to customize your logging configuration.
  140. LOGGING = {
  141.     'version': 1,
  142.     'disable_existing_loggers': False,
  143.     'handlers': {
  144.         'mail_admins': {
  145.             'level': 'ERROR',
  146.             'class': 'django.utils.log.AdminEmailHandler'
  147.         }
  148.     },
  149.     'loggers': {
  150.         'django.request': {
  151.             'handlers': ['mail_admins'],
  152.             'level': 'ERROR',
  153.             'propagate': True,
  154.         },
  155.     }
  156. }
Advertisement
Add Comment
Please, Sign In to add comment