PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/django/branches/attic/search-api/django/conf/global_settings.py

https://bitbucket.org/mirror/django/
Python | 298 lines | 187 code | 34 blank | 77 comment | 0 complexity | ef7d1afaf3d211142b0afd2f38cb942b MD5 | raw file
Possible License(s): BSD-3-Clause
  1. # Default Django settings. Override these with settings in the module
  2. # pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
  3. # This is defined here as a do-nothing function because we can't import
  4. # django.utils.translation -- that module depends on the settings.
  5. gettext_noop = lambda s: s
  6. ####################
  7. # CORE #
  8. ####################
  9. DEBUG = False
  10. TEMPLATE_DEBUG = False
  11. # Whether to use the "Etag" header. This saves bandwidth but slows down performance.
  12. USE_ETAGS = False
  13. # People who get code error notifications.
  14. # In the format (('Full Name', 'email@domain.com'), ('Full Name', 'anotheremail@domain.com'))
  15. ADMINS = ()
  16. # Tuple of IP addresses, as strings, that:
  17. # * See debug comments, when DEBUG is true
  18. # * Receive x-headers
  19. INTERNAL_IPS = ()
  20. # Local time zone for this installation. All choices can be found here:
  21. # http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
  22. TIME_ZONE = 'America/Chicago'
  23. # Language code for this installation. All choices can be found here:
  24. # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
  25. # http://blogs.law.harvard.edu/tech/stories/storyReader$15
  26. LANGUAGE_CODE = 'en-us'
  27. # Languages we provide translations for, out of the box. The language name
  28. # should be the utf-8 encoded local name for the language.
  29. LANGUAGES = (
  30. ('ar', gettext_noop('Arabic')),
  31. ('bn', gettext_noop('Bengali')),
  32. ('cs', gettext_noop('Czech')),
  33. ('cy', gettext_noop('Welsh')),
  34. ('da', gettext_noop('Danish')),
  35. ('de', gettext_noop('German')),
  36. ('el', gettext_noop('Greek')),
  37. ('en', gettext_noop('English')),
  38. ('es', gettext_noop('Spanish')),
  39. ('es_AR', gettext_noop('Argentinean Spanish')),
  40. ('fr', gettext_noop('French')),
  41. ('gl', gettext_noop('Galician')),
  42. ('hu', gettext_noop('Hungarian')),
  43. ('he', gettext_noop('Hebrew')),
  44. ('is', gettext_noop('Icelandic')),
  45. ('it', gettext_noop('Italian')),
  46. ('ja', gettext_noop('Japanese')),
  47. ('nl', gettext_noop('Dutch')),
  48. ('no', gettext_noop('Norwegian')),
  49. ('pt-br', gettext_noop('Brazilian')),
  50. ('ro', gettext_noop('Romanian')),
  51. ('ru', gettext_noop('Russian')),
  52. ('sk', gettext_noop('Slovak')),
  53. ('sl', gettext_noop('Slovenian')),
  54. ('sr', gettext_noop('Serbian')),
  55. ('sv', gettext_noop('Swedish')),
  56. ('ta', gettext_noop('Tamil')),
  57. ('uk', gettext_noop('Ukrainian')),
  58. ('zh-cn', gettext_noop('Simplified Chinese')),
  59. ('zh-tw', gettext_noop('Traditional Chinese')),
  60. )
  61. # Languages using BiDi (right-to-left) layout
  62. LANGUAGES_BIDI = ("he", "ar")
  63. # If you set this to False, Django will make some optimizations so as not
  64. # to load the internationalization machinery.
  65. USE_I18N = True
  66. # Not-necessarily-technical managers of the site. They get broken link
  67. # notifications and other various e-mails.
  68. MANAGERS = ADMINS
  69. # Default content type and charset to use for all HttpResponse objects, if a
  70. # MIME type isn't manually specified. These are used to construct the
  71. # Content-Type header.
  72. DEFAULT_CONTENT_TYPE = 'text/html'
  73. DEFAULT_CHARSET = 'utf-8'
  74. # E-mail address that error messages come from.
  75. SERVER_EMAIL = 'root@localhost'
  76. # Whether to send broken-link e-mails.
  77. SEND_BROKEN_LINK_EMAILS = False
  78. # Database connection info.
  79. DATABASE_ENGINE = '' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
  80. DATABASE_NAME = '' # Or path to database file if using sqlite3.
  81. DATABASE_USER = '' # Not used with sqlite3.
  82. DATABASE_PASSWORD = '' # Not used with sqlite3.
  83. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
  84. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
  85. # Host for sending e-mail.
  86. EMAIL_HOST = 'localhost'
  87. # Port for sending e-mail.
  88. EMAIL_PORT = 25
  89. # Optional SMTP authentication information for EMAIL_HOST.
  90. EMAIL_HOST_USER = ''
  91. EMAIL_HOST_PASSWORD = ''
  92. # List of strings representing installed apps.
  93. INSTALLED_APPS = ()
  94. # List of locations of the template source files, in search order.
  95. TEMPLATE_DIRS = ()
  96. # List of callables that know how to import templates from various sources.
  97. # See the comments in django/core/template/loader.py for interface
  98. # documentation.
  99. TEMPLATE_LOADERS = (
  100. 'django.template.loaders.filesystem.load_template_source',
  101. 'django.template.loaders.app_directories.load_template_source',
  102. # 'django.template.loaders.eggs.load_template_source',
  103. )
  104. # List of processors used by RequestContext to populate the context.
  105. # Each one should be a callable that takes the request object as its
  106. # only parameter and returns a dictionary to add to the context.
  107. TEMPLATE_CONTEXT_PROCESSORS = (
  108. 'django.core.context_processors.auth',
  109. 'django.core.context_processors.debug',
  110. 'django.core.context_processors.i18n',
  111. # 'django.core.context_processors.request',
  112. )
  113. # Output to use in template system for invalid (e.g. misspelled) variables.
  114. TEMPLATE_STRING_IF_INVALID = ''
  115. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  116. # trailing slash.
  117. # Examples: "http://foo.com/media/", "/media/".
  118. ADMIN_MEDIA_PREFIX = '/media/'
  119. # Default e-mail address to use for various automated correspondence from
  120. # the site managers.
  121. DEFAULT_FROM_EMAIL = 'webmaster@localhost'
  122. # Subject-line prefix for email messages send with django.core.mail.mail_admins
  123. # or ...mail_managers. Make sure to include the trailing space.
  124. EMAIL_SUBJECT_PREFIX = '[Django] '
  125. # Whether to append trailing slashes to URLs.
  126. APPEND_SLASH = True
  127. # Whether to prepend the "www." subdomain to URLs that don't have it.
  128. PREPEND_WWW = False
  129. # List of compiled regular expression objects representing User-Agent strings
  130. # that are not allowed to visit any page, systemwide. Use this for bad
  131. # robots/crawlers. Here are a few examples:
  132. # import re
  133. # DISALLOWED_USER_AGENTS = (
  134. # re.compile(r'^NaverBot.*'),
  135. # re.compile(r'^EmailSiphon.*'),
  136. # re.compile(r'^SiteSucker.*'),
  137. # re.compile(r'^sohu-search')
  138. # )
  139. DISALLOWED_USER_AGENTS = ()
  140. ABSOLUTE_URL_OVERRIDES = {}
  141. # Tuple of strings representing allowed prefixes for the {% ssi %} tag.
  142. # Example: ('/home/html', '/var/www')
  143. ALLOWED_INCLUDE_ROOTS = ()
  144. # If this is a admin settings module, this should be a list of
  145. # settings modules (in the format 'foo.bar.baz') for which this admin
  146. # is an admin.
  147. ADMIN_FOR = ()
  148. # 404s that may be ignored.
  149. IGNORABLE_404_STARTS = ('/cgi-bin/', '/_vti_bin', '/_vti_inf')
  150. IGNORABLE_404_ENDS = ('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
  151. # A secret key for this particular Django installation. Used in secret-key
  152. # hashing algorithms. Set this in your settings, or Django will complain
  153. # loudly.
  154. SECRET_KEY = ''
  155. # Path to the "jing" executable -- needed to validate XMLFields
  156. JING_PATH = "/usr/bin/jing"
  157. # Absolute path to the directory that holds media.
  158. # Example: "/home/media/media.lawrence.com/"
  159. MEDIA_ROOT = ''
  160. # URL that handles the media served from MEDIA_ROOT.
  161. # Example: "http://media.lawrence.com"
  162. MEDIA_URL = ''
  163. # Default formatting for date objects. See all available format strings here:
  164. # http://www.djangoproject.com/documentation/templates/#now
  165. DATE_FORMAT = 'N j, Y'
  166. # Default formatting for datetime objects. See all available format strings here:
  167. # http://www.djangoproject.com/documentation/templates/#now
  168. DATETIME_FORMAT = 'N j, Y, P'
  169. # Default formatting for time objects. See all available format strings here:
  170. # http://www.djangoproject.com/documentation/templates/#now
  171. TIME_FORMAT = 'P'
  172. # Default formatting for date objects when only the year and month are relevant.
  173. # See all available format strings here:
  174. # http://www.djangoproject.com/documentation/templates/#now
  175. YEAR_MONTH_FORMAT = 'F Y'
  176. # Default formatting for date objects when only the month and day are relevant.
  177. # See all available format strings here:
  178. # http://www.djangoproject.com/documentation/templates/#now
  179. MONTH_DAY_FORMAT = 'F j'
  180. # Whether to enable Psyco, which optimizes Python code. Requires Psyco.
  181. # http://psyco.sourceforge.net/
  182. ENABLE_PSYCO = False
  183. # Do you want to manage transactions manually?
  184. # Hint: you really don't!
  185. TRANSACTIONS_MANAGED = False
  186. ##############
  187. # MIDDLEWARE #
  188. ##############
  189. # List of middleware classes to use. Order is important; in the request phase,
  190. # this middleware classes will be applied in the order given, and in the
  191. # response phase the middleware will be applied in reverse order.
  192. MIDDLEWARE_CLASSES = (
  193. 'django.contrib.sessions.middleware.SessionMiddleware',
  194. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  195. # 'django.middleware.http.ConditionalGetMiddleware',
  196. # 'django.middleware.gzip.GZipMiddleware',
  197. 'django.middleware.common.CommonMiddleware',
  198. 'django.middleware.doc.XViewMiddleware',
  199. )
  200. ############
  201. # SESSIONS #
  202. ############
  203. SESSION_COOKIE_NAME = 'sessionid' # Cookie name. This can be whatever you want.
  204. SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds (default: 2 weeks).
  205. SESSION_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie.
  206. SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only).
  207. SESSION_SAVE_EVERY_REQUEST = False # Whether to save the session data on every request.
  208. SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Whether sessions expire when a user closes his browser.
  209. #########
  210. # CACHE #
  211. #########
  212. # The cache backend to use. See the docstring in django.core.cache for the
  213. # possible values.
  214. CACHE_BACKEND = 'simple://'
  215. CACHE_MIDDLEWARE_KEY_PREFIX = ''
  216. ####################
  217. # COMMENTS #
  218. ####################
  219. COMMENTS_ALLOW_PROFANITIES = False
  220. # The group ID that designates which users are banned.
  221. # Set to None if you're not using it.
  222. COMMENTS_BANNED_USERS_GROUP = None
  223. # The group ID that designates which users can moderate comments.
  224. # Set to None if you're not using it.
  225. COMMENTS_MODERATORS_GROUP = None
  226. # The group ID that designates the users whose comments should be e-mailed to MANAGERS.
  227. # Set to None if you're not using it.
  228. COMMENTS_SKETCHY_USERS_GROUP = None
  229. # The system will e-mail MANAGERS the first COMMENTS_FIRST_FEW comments by each
  230. # user. Set this to 0 if you want to disable it.
  231. COMMENTS_FIRST_FEW = 0
  232. # A tuple of IP addresses that have been banned from participating in various
  233. # Django-powered features.
  234. BANNED_IPS = ()
  235. ##################
  236. # AUTHENTICATION #
  237. ##################
  238. AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',)