Advertisement
Guest User

dj_site/settings

a guest
Dec 21st, 2013
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.77 KB | None | 0 0
  1. # Django settings for dj_site project.
  2.  
  3. DEBUG = False
  4. ##DEBUG = True
  5. TEMPLATE_DEBUG = DEBUG
  6.  
  7. # Hosts/domain names that are valid for this site; required if DEBUG is False
  8. # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
  9. ALLOWED_HOSTS = [
  10.     'www.my-domain.com','127.0.0.1',
  11. ]
  12.  
  13. # Absolute path to the directory static files should be collected to.
  14. # Don't put anything in this directory yourself; store your static files
  15. # in apps' "static/" subdirectories and in STATICFILES_DIRS.
  16. # Example: "/var/www/example.com/static/"
  17. STATIC_ROOT = '/web/site/static/'
  18.  
  19. # URL prefix for static files.
  20. # Example: "http://example.com/static/", "http://static.example.com/"
  21. STATIC_URL = '/static/'
  22.  
  23. # Additional locations of static files
  24. STATICFILES_DIRS = (
  25.     # Put strings here, like "/home/html/static" or "C:/www/django/static".
  26.     # Always use forward slashes, even on Windows.
  27.     # Don't forget to use absolute paths, not relative paths.
  28.     '/web/site/dj_site/proj_static',
  29. )
  30.  
  31. # List of finder classes that know how to find static files in
  32. # various locations.
  33. STATICFILES_FINDERS = (
  34.     'django.contrib.staticfiles.finders.FileSystemFinder',
  35.     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  36. #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
  37. )
  38.  
  39. # List of callables that know how to import templates from various sources.
  40. TEMPLATE_LOADERS = (
  41.     'django.template.loaders.filesystem.Loader',
  42.     'django.template.loaders.app_directories.Loader',
  43. #     'django.template.loaders.eggs.Loader',
  44. )
  45.  
  46. MIDDLEWARE_CLASSES = (
  47.     'django.middleware.common.CommonMiddleware',
  48.     'django.contrib.sessions.middleware.SessionMiddleware',
  49.     'django.middleware.csrf.CsrfViewMiddleware',
  50.     'django.contrib.auth.middleware.AuthenticationMiddleware',
  51.     'django.contrib.messages.middleware.MessageMiddleware',
  52.     # Uncomment the next line for simple clickjacking protection:
  53.     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  54. )
  55.  
  56. ROOT_URLCONF = 'dj_site.urls'
  57.  
  58. # Python dotted path to the WSGI application used by Django's runserver.
  59. WSGI_APPLICATION = 'dj_site.wsgi.application'
  60.  
  61. TEMPLATE_DIRS = (
  62.     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  63.     # Always use forward slashes, even on Windows.
  64.     # Don't forget to use absolute paths, not relative paths.
  65. )
  66.  
  67. INSTALLED_APPS = (
  68.     'django.contrib.auth',
  69.     'django.contrib.contenttypes',
  70.     'django.contrib.sessions',
  71.     'django.contrib.sites',
  72.     'django.contrib.messages',
  73.     'django.contrib.staticfiles',
  74.     # Uncomment the next line to enable the admin:
  75.     'django.contrib.admin',
  76.     # Uncomment the next line to enable admin documentation:
  77.     # 'django.contrib.admindocs',
  78.     'polls',
  79.     'index',
  80. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement