Go to file
Aymeric Augustin e3b6fed320 [1.4.x] Fixed #20636 -- Stopped stuffing values in the settings.
In Django < 1.6, override_settings restores the settings module that was
active when the override_settings call was executed, not when it was
run. This can make a difference when override_settings is applied to a
class, since it's executed when the module is imported, not when the
test case is run.

In addition, if the settings module for tests is stored alongside the
tests themselves, importing the settings module can trigger an import
of the tests. Since the settings module isn't fully imported yet,
class-level override_settings statements may store a reference to an
incorrect settings module. Eventually this will result in a crash during
test teardown because the settings module restored by override_settings
won't the one that was active during test setup.

While Django should prevent this situation in the future by failing
loudly in such dubious import sequences, that change won't be backported
to 1.5 and 1.4. However, these versions received the "allowed hosts"
patch and they're prone to "AttributeError: 'Settings' object has no
attribute '_original_allowed_hosts'". To mitigate this regression, this
commits stuffs _original_allowed_hosts on a random module instead of the
settings module.

This problem shouldn't occur in Django 1.6, see #20290, but this patch
will be forward-ported for extra safety.

Also tweaked backup variable names for consistency.

Backport of 0261922 from stable/1.5.x.

Conflicts:
	django/test/utils.py
2013-06-24 20:42:42 +02:00
.tx Added a language mapping for Serbian (Latin) to the Transifex configuration file. 2012-03-23 02:31:12 +00:00
django [1.4.x] Fixed #20636 -- Stopped stuffing values in the settings. 2013-06-24 20:42:42 +02:00
docs [1.4.x] Fixed #20326 - Corrected form wizard get_form() example. 2013-05-31 08:09:17 -04:00
extras Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl. 2011-08-12 14:14:15 +00:00
scripts Fixed #11184 -- Made it possible to build RPMs with a non-default python executable. 2012-01-02 20:09:58 +00:00
tests [1.4.x] Made a couple of selenium tests wait for page loaded 2013-02-21 00:03:39 +02:00
.gitignore [1.4.X] Fixed #16817 - Added a guide of code coverage to contributing docs. 2012-10-11 06:14:24 -04:00
.hgignore [1.4.X] Fixed #16817 - Added a guide of code coverage to contributing docs. 2012-10-11 06:14:24 -04:00
AUTHORS [1.4.X] Fixed #17016 - Added examples for file uploads in views. 2012-08-10 17:32:34 -04:00
INSTALL Fixed #16155 -- Removed Python 2.4 compatibility constructs from code and mentions from docs. Thanks Aymeric Augustin for the report and patch. 2011-06-09 20:01:28 +00:00
LICENSE Updated LICENSE file to acknowledge individual copyrights as well (after 2008-08-09 14:40:51 +00:00
MANIFEST.in Fixed the manifest template to correctly ship admin's static files. 2011-07-01 15:18:34 +00:00
README Fixed the link to the IRC logs in the README. Refs #17453, #16277. 2012-01-21 15:45:54 +00:00
setup.cfg Fixed #13153 -- Removed a stale reference to the examples directory in setup.cfg. Thanks to cesar@mifprojects.com for the report. 2010-08-05 13:00:09 +00:00
setup.py [1.4.x] Bump version numbers to roll a clean package. 2013-02-20 13:53:27 -06:00

README

Django is a high-level Python Web framework that encourages rapid development
and clean, pragmatic design.

All documentation is in the "docs" directory and online at
http://docs.djangoproject.com/en/dev/. If you're just getting started, here's
how we recommend you read the docs:

    * First, read docs/intro/install.txt for instructions on installing Django.

    * Next, work through the tutorials in order (docs/intro/tutorial01.txt,
      docs/intro/tutorial02.txt, etc.).

    * If you want to set up an actual deployment server, read
      docs/howto/deployment/index.txt for instructions.

    * You'll probably want to read through the topical guides (in docs/topics)
      next; from there you can jump to the HOWTOs (in docs/howto) for specific
      problems, and check out the reference (docs/ref) for gory details.

    * See docs/README for instructions on building an HTML version of the docs.

Docs are updated rigorously. If you find any problems in the docs, or think they
should be clarified in any way, please take 30 seconds to fill out a ticket
here:

http://code.djangoproject.com/newticket

To get more help:

    * Join the #django channel on irc.freenode.net. Lots of helpful people
      hang out there. Read the archives at http://django-irc-logs.com/.

    * Join the django-users mailing list, or read the archives, at
      http://groups.google.com/group/django-users.

To contribute to Django:

    * Check out http://www.djangoproject.com/community/ for information
      about getting involved.

To run Django's test suite:

    * Follow the instructions in the "Unit tests" section of
      docs/internals/contributing/writing-code/unit-tests.txt, published online at
      https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#running-the-unit-tests