Advertisement
Guest User

Untitled

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