Advertisement
Guest User

Untitled

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