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