Permalink
Browse files

Merge branch 'master' into schema-alteration

Conflicts:
	django/db/backends/__init__.py
	django/db/models/fields/related.py
	django/db/models/options.py
  • Loading branch information...
2 parents a589fdf + fabe9c9 commit 6a632e04578776e877adc5e2dc53f008c890a0d4 @andrewgodwin andrewgodwin committed Oct 26, 2012
Showing 521 changed files with 11,911 additions and 13,345 deletions.
View
@@ -1,4 +1,8 @@
*.egg-info
*.pot
*.py[co]
+MANIFEST
+dist/
docs/_build/
+tests/coverage_html/
+tests/.coverage
View
@@ -4,3 +4,5 @@ syntax:glob
*.pot
*.py[co]
docs/_build/
+tests/coverage_html/
+tests/.coverage
View
@@ -1,5 +1,5 @@
[main]
-host = https://www.transifex.net
+host = https://www.transifex.com
lang_map = sr@latin:sr_Latn
[django.core]
View
@@ -33,6 +33,7 @@ The PRIMARY AUTHORS are (and/or have been):
* Florian Apolloner
* Jeremy Dunck
* Bryan Veloso
+ * Preston Holmes
More information on the main contributors to Django can be found in
docs/internals/committers.txt.
@@ -424,6 +425,7 @@ answer newbie questions, and generally made Django that much better:
phil@produxion.net
phil.h.smith@gmail.com
Gustavo Picon
+ Travis Pinney
Michael Placentra II <someone@michaelplacentra2.net>
plisk
Daniel Poelzleithner <http://poelzi.org/>
@@ -499,6 +501,7 @@ answer newbie questions, and generally made Django that much better:
Wiliam Alves de Souza <wiliamsouza83@gmail.com>
Don Spaulding <donspauldingii@gmail.com>
Calvin Spealman <ironfroggy@gmail.com>
+ Dane Springmeyer
Bjørn Stabell <bjorn@exoweb.net>
Georgi Stanojevski <glisha@gmail.com>
starrynight <cmorgh@gmail.com>
View
@@ -0,0 +1,16 @@
+======================
+Contributing to Django
+======================
+
+As an open source project, Django welcomes contributions of many forms.
+
+Examples of contributions include:
+
+* Code patches
+* Documentation improvements
+* Bug reports and patch reviews
+
+Extensive contribution guidelines are available in the repository at
+``docs/internals/contributing/``, or online at:
+
+https://docs.djangoproject.com/en/dev/internals/contributing/
View
@@ -32,3 +32,5 @@ recursive-include django/contrib/gis/tests/geogapp/fixtures *
recursive-include django/contrib/gis/tests/relatedapp/fixtures *
recursive-include django/contrib/sitemaps/templates *
recursive-include django/contrib/sitemaps/tests/templates *
+recursive-exclude * __pycache__
+recursive-exclude * *.py[co]
View
@@ -25,7 +25,7 @@ class LazySettings(LazyObject):
The user can manually configure settings prior to using them. Otherwise,
Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE.
"""
- def _setup(self, name):
+ def _setup(self, name=None):
"""
Load the settings module pointed to by the environment variable. This
is used the first time we need any settings at all, if the user has not
@@ -36,20 +36,40 @@ def _setup(self, name):
if not settings_module: # If it's set but is an empty string.
raise KeyError
except KeyError:
+ desc = ("setting %s" % name) if name else "settings"
raise ImproperlyConfigured(
- "Requested setting %s, but settings are not configured. "
+ "Requested %s, but settings are not configured. "
"You must either define the environment variable %s "
"or call settings.configure() before accessing settings."
- % (name, ENVIRONMENT_VARIABLE))
+ % (desc, ENVIRONMENT_VARIABLE))
self._wrapped = Settings(settings_module)
-
+ self._configure_logging()
def __getattr__(self, name):
if self._wrapped is empty:
self._setup(name)
return getattr(self._wrapped, name)
+ def _configure_logging(self):
+ """
+ Setup logging from LOGGING_CONFIG and LOGGING settings.
+ """
+ if self.LOGGING_CONFIG:
+ from django.utils.log import DEFAULT_LOGGING
+ # First find the logging configuration function ...
+ logging_config_path, logging_config_func_name = self.LOGGING_CONFIG.rsplit('.', 1)
+ logging_config_module = importlib.import_module(logging_config_path)
+ logging_config_func = getattr(logging_config_module, logging_config_func_name)
+
+ logging_config_func(DEFAULT_LOGGING)
+
+ if self.LOGGING:
+ # Backwards-compatibility shim for #16288 fix
+ compat_patch_logging_config(self.LOGGING)
+
+ # ... then invoke it with the logging settings
+ logging_config_func(self.LOGGING)
def configure(self, default_settings=global_settings, **options):
"""
@@ -133,19 +153,6 @@ def __init__(self, settings_module):
os.environ['TZ'] = self.TIME_ZONE
time.tzset()
- # Settings are configured, so we can set up the logger if required
- if self.LOGGING_CONFIG:
- # First find the logging configuration function ...
- logging_config_path, logging_config_func_name = self.LOGGING_CONFIG.rsplit('.', 1)
- logging_config_module = importlib.import_module(logging_config_path)
- logging_config_func = getattr(logging_config_module, logging_config_func_name)
-
- # Backwards-compatibility shim for #16288 fix
- compat_patch_logging_config(self.LOGGING)
-
- # ... then invoke it with the logging settings
- logging_config_func(self.LOGGING)
-
class UserSettingsHolder(BaseSettings):
"""
@@ -144,7 +144,7 @@
# Encoding of files read from disk (template and initial SQL files).
FILE_CHARSET = 'utf-8'
-# E-mail address that error messages come from.
+# Email address that error messages come from.
SERVER_EMAIL = 'root@localhost'
# Whether to send broken-link emails.
@@ -488,6 +488,8 @@
# AUTHENTICATION #
##################
+AUTH_USER_MODEL = 'auth.User'
+
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',)
LOGIN_URL = '/accounts/login/'
@@ -549,33 +551,8 @@
# The callable to use to configure logging
LOGGING_CONFIG = 'django.utils.log.dictConfig'
-# The default logging configuration. This sends an email to
-# the site admins on every HTTP 500 error. All other log
-# records are sent to the bit bucket.
-
-LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'filters': {
- 'require_debug_false': {
- '()': 'django.utils.log.RequireDebugFalse',
- }
- },
- 'handlers': {
- 'mail_admins': {
- 'level': 'ERROR',
- 'filters': ['require_debug_false'],
- 'class': 'django.utils.log.AdminEmailHandler'
- }
- },
- 'loggers': {
- 'django.request': {
- 'handlers': ['mail_admins'],
- 'level': 'ERROR',
- 'propagate': True,
- },
- }
-}
+# Custom logging configuration.
+LOGGING = {}
# Default exception reporter filter class used in case none has been
# specifically assigned to the HttpRequest instance.
@@ -35,7 +35,7 @@
'%Y-%m-%d', # '2006-10-25'
)
-# these are the separators for non-monetary numbers. For monetary numbers,
+# these are the separators for non-monetary numbers. For monetary numbers,
# the DECIMAL_SEPARATOR is a . (decimal point) and the THOUSAND_SEPARATOR is a
# ' (single quote).
# For details, please refer to http://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de
Oops, something went wrong.

0 comments on commit 6a632e0

Please sign in to comment.