PageRenderTime 47ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/testproject/testproject/settings.py

https://github.com/benjaoming/django-stopforumspam
Python | 134 lines | 73 code | 23 blank | 38 comment | 0 complexity | dd6c2dfe890d5646d8e80a590ad6484a MD5 | raw file
  1. # Django settings for testproject project.
  2. DEBUG = True
  3. TEMPLATE_DEBUG = DEBUG
  4. ADMINS = (
  5. # ('Your Name', 'your_email@example.com'),
  6. )
  7. MANAGERS = ADMINS
  8. DATABASES = {
  9. 'default': {
  10. # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
  11. 'ENGINE': 'django.db.backends.sqlite3',
  12. # Or path to database file if using sqlite3.
  13. 'NAME': 'test.db',
  14. }
  15. }
  16. # Hosts/domain names that are valid for this site; required if DEBUG is False
  17. # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
  18. ALLOWED_HOSTS = []
  19. # Local time zone for this installation. Choices can be found here:
  20. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  21. # although not all choices may be available on all operating systems.
  22. # In a Windows environment this must be set to your system time zone.
  23. TIME_ZONE = 'America/Chicago'
  24. # Language code for this installation. All choices can be found here:
  25. # http://www.i18nguy.com/unicode/language-identifiers.html
  26. LANGUAGE_CODE = 'en-us'
  27. SITE_ID = 1
  28. # If you set this to False, Django will make some optimizations so as not
  29. # to load the internationalization machinery.
  30. USE_I18N = True
  31. # If you set this to False, Django will not format dates, numbers and
  32. # calendars according to the current locale.
  33. USE_L10N = True
  34. # If you set this to False, Django will not use timezone-aware datetimes.
  35. USE_TZ = True
  36. # Absolute filesystem path to the directory that will hold user-uploaded files.
  37. # Example: "/var/www/example.com/media/"
  38. MEDIA_ROOT = ''
  39. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  40. # trailing slash.
  41. # Examples: "http://example.com/media/", "http://media.example.com/"
  42. MEDIA_URL = ''
  43. # Absolute path to the directory static files should be collected to.
  44. # Don't put anything in this directory yourself; store your static files
  45. # in apps' "static/" subdirectories and in STATICFILES_DIRS.
  46. # Example: "/var/www/example.com/static/"
  47. STATIC_ROOT = ''
  48. # URL prefix for static files.
  49. # Example: "http://example.com/static/", "http://static.example.com/"
  50. STATIC_URL = '/static/'
  51. # Additional locations of static files
  52. STATICFILES_DIRS = (
  53. # Put strings here, like "/home/html/static" or "C:/www/django/static".
  54. # Always use forward slashes, even on Windows.
  55. # Don't forget to use absolute paths, not relative paths.
  56. )
  57. # List of finder classes that know how to find static files in
  58. # various locations.
  59. STATICFILES_FINDERS = (
  60. 'django.contrib.staticfiles.finders.FileSystemFinder',
  61. 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  62. # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
  63. )
  64. # Make this unique, and don't share it with anybody.
  65. SECRET_KEY = ')-7+oc(r_ixb2w0r$k1hs^hhgtvu9ei8yz)lw8l(3o-g)hcato'
  66. # List of callables that know how to import templates from various sources.
  67. TEMPLATE_LOADERS = (
  68. 'django.template.loaders.filesystem.Loader',
  69. 'django.template.loaders.app_directories.Loader',
  70. # 'django.template.loaders.eggs.Loader',
  71. )
  72. MIDDLEWARE_CLASSES = (
  73. 'django.middleware.common.CommonMiddleware',
  74. 'django.contrib.sessions.middleware.SessionMiddleware',
  75. 'django.middleware.csrf.CsrfViewMiddleware',
  76. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  77. 'django.contrib.messages.middleware.MessageMiddleware',
  78. # Uncomment the next line for simple clickjacking protection:
  79. # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  80. )
  81. ROOT_URLCONF = 'testproject.urls'
  82. # Python dotted path to the WSGI application used by Django's runserver.
  83. WSGI_APPLICATION = 'testproject.wsgi.application'
  84. TEMPLATE_DIRS = (
  85. # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  86. # Always use forward slashes, even on Windows.
  87. # Don't forget to use absolute paths, not relative paths.
  88. )
  89. INSTALLED_APPS = (
  90. 'django.contrib.auth',
  91. 'django.contrib.contenttypes',
  92. 'django.contrib.sessions',
  93. 'django.contrib.sites',
  94. 'django.contrib.messages',
  95. 'django.contrib.staticfiles',
  96. # Uncomment the next line to enable the admin:
  97. 'django.contrib.admin',
  98. 'stopforumspam',
  99. # Uncomment the next line to enable admin documentation:
  100. # 'django.contrib.admindocs',
  101. )
  102. SFS_ALL_POST_REQUESTS = True
  103. # SFS_SOURCE_ZIP = "http://www.stopforumspam.com/downloads/listed_ip_7.zip"
  104. # SFS_SOURCE_ZIP = "file:///tmp/listed_ip_7.zip"
  105. SFS_SOURCE_ZIP = "file://listed_ip_7.zip"
  106. SFS_ZIP_FILENAME = "listed_ip_7.txt"
  107. SFS_CACHE_EXPIRE = 1 # day