Commit Graph

25 Commits

Author SHA1 Message Date
Adrian Holovaty 5ceed0a053 Changed a whole bunch of places to raise exception instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 18:36:20 +00:00
Russell Keith-Magee ff60c5f9de Fixed #1142 -- Added multiple database support.
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project.
Congratulations to Alex for a job well done.

Big thanks also go to:
 * Justin Bronn for keeping GIS in line with the changes,
 * Karen Tracey and Jani Tiainen for their help testing Oracle support
 * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback.
 * Malcolm Treddinick for his guidance during the GSoC submission process.
 * Simon Willison for driving the original design process
 * Cal Henderson for complaining about ponies he wanted.

... and everyone else too numerous to mention that helped to bring this feature into fruition.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 15:18:51 +00:00
Malcolm Tredinnick 0dd4ec654f Invalidate the appropriate SITE_CACHE entry when saving a Site model.
This avoids the problem of, for example, saving a change to the Site model in
the admin interface and then seeing the wrong instanec returned in the next
call to get_current_site().

It's still possible to end up with an inconsistent cache if update() is used to
change the Site model, but that's pretty unavoidable. It's also a slightly odd
way to update a Site model, so if you really need to do that, you can manage to
call SiteManager.clear() at the same time.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-27 04:57:33 +00:00
Jacob Kaplan-Moss f2d7ee759a Fixed #8710: removed a few stray tabs. Thanks, gkelly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 19:25:40 +00:00
Malcolm Tredinnick 65c0846c45 Updated a few save() methods on models to accept force_insert and force_update
parameters. Required as a consequence of [8670] (so they can be used with
create()).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 19:28:17 +00:00
Jacob Kaplan-Moss 34a3bd5225 Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster.
Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes.

Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated.

Documentation is, sigh, still forthcoming.

Fixes #6814 and #3951 (with the new dispatch_uid argument to connect).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-06 15:32:46 +00:00
Russell Keith-Magee f423dde34a Fixed #7978 -- Modified the contrib.sites tests to guarantee the initial conditions of the test match meet the requirements of the test. Thanks to Evan Schulz for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-31 09:24:16 +00:00
Brian Rosner a19ed8aea3 Merged the newforms-admin branch into trunk.
This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets
and Media definitions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:54:34 +00:00
Russell Keith-Magee 87a704cf50 Fixed #7531 -- Modified the sites test so that user-provided initial data doesn't cause breakage when executed from within user applications. Thanks for the report, madkinder@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-25 12:09:18 +00:00
Russell Keith-Magee 1fc0077a95 Fixed #7517 -- Added code to remove Sites from the site cache when they are deleted. Thanks to Marc Fargas for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-22 06:50:25 +00:00
Russell Keith-Magee b83fcacfcc Fixed #7514 -- Added code to clear the site cache on sync. This shouldn't have any effect on regular usage, but it does correct an error in the test suite. Thanks to Marc Fargas for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-22 06:34:17 +00:00
Malcolm Tredinnick 4b610f42d3 Added a get_host() method to HttpRequest. There is still an http.get_host() version in place, so this is fully backwards compatible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 17:46:03 +00:00
Malcolm Tredinnick 36396fb430 Fixed #3766 -- Added in-memory caching for the sites framework. Will speed up all the "current site" lookups. Thanks, Matt Riggott.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 08:37:09 +00:00
Malcolm Tredinnick 0863a634f3 Fixed #4951 -- Improved host retrieval in sites.models.RequestSite. Thanks, Caleb.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 07:12:47 +00:00
Adrian Holovaty a31bbda980 Fixed #5410 -- Added a __unicode__() method to RequestSite. Thanks, bos
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13 14:40:08 +00:00
Gary Wilson Jr 212ee65be7 Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Adrian Holovaty dcd5750d7a Added RequestSite class to sites framework
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 05:28:04 +00:00
Adrian Holovaty 06fc225ae6 Added helpful error message to SiteManager.get_current() if the user hasn't set SITE_ID
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5652 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 05:23:47 +00:00
Malcolm Tredinnick 953badbea5 Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Russell Keith-Magee 77ab11be45 Refs #2333 - Added 'test' target to django-admin script. Includes addition of --verbosity and --noinput options to django-admin, and a new TEST_RUNNER setting to control the tool used to execute tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27 12:46:39 +00:00
Adrian Holovaty a537b8e515 Fixed #1985 -- Got CurrentSiteManager working
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 16:30:42 +00:00
Adrian Holovaty 4cb7a2753f Fixed some bugs in django/contrib/sites/managers and added some error checking
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2961 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-22 05:17:25 +00:00
Adrian Holovaty a9039dc6b3 Added django.contrib.sites.managers, which contains CurrentSiteManager. Thanks, Ian Holsman
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-22 04:59:22 +00:00
Adrian Holovaty edce4128e1 Changed Site model to use str, not repr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-11 17:51:30 +00:00
Adrian Holovaty f69cf70ed8 MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00