Alex Gaynor
96cc7baf0c
Fixed #13684 -- if settings.ROOT_URLCONF isn't defined don't blow up with an UnboundLocalError.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-07 16:02:22 +00:00
Russell Keith-Magee
c906b270f5
Fixed #14602 -- Added an extra check to wsgi.input handling to prevent AppEngine from choking. Thanks to Waldemar Kornewald for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 12:03:38 +00:00
Russell Keith-Magee
52e0bcbc62
Fixed #14588 -- Corrected r14393 to ensure that response middlewares are are always applied. Includes a battery of tests to validate the expected behavior of the middleware cycle. Thanks to Petr Marhoun for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 07:19:04 +00:00
Russell Keith-Magee
269e921756
Fixed #9886 -- Added a file-like interface to HttpRequest. Thanks to Ivan Sagalaev for the suggestion and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:39:25 +00:00
Russell Keith-Magee
3086b55b0e
Fixed #14523 -- Modified response handling so that exceptions raised by process_response() in a middleware are caught and handled like any other exception. Thanks to Ivan Sagalaev for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 07:43:56 +00:00
Russell Keith-Magee
a904e55859
Fixed #11509 -- Modified usage of "Web" to match our style guide in various documentation, comments and code. Thanks to timo and Simon Meers for the work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 08:12:50 +00:00
Russell Keith-Magee
fea159282b
Fixed #14406 -- Added a Python 2.4 compatibility to the logging interface. Thanks to Łukasz Rekucki for the report, and to Luke Plant for original patch this was based on.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-06 15:02:26 +00:00
Russell Keith-Magee
24acca4139
Fixed #12012 -- Added support for logging. Thanks to Vinay Sajip for his draft patch, and to the many people who gave feedback during development of the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-04 15:12:39 +00:00
Russell Keith-Magee
f611ffaab3
Fixed #13820 -- Started the deprecation process for mod_python. Thanks to Robert Coup for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-28 02:40:57 +00:00
Luke Plant
3e1e04d6d0
Fixed #10758 - sys.exc_info() should not be stored on a local variable
...
Thanks piotr.findeisen for report, kevinh for patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13318 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-03 18:50:04 +00:00
Russell Keith-Magee
667ced2abc
Fixed #12594 -- Ensured that a meaningful exception is raised when the urlconf_module is None. Thanks to buriy for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-26 15:08:24 +00:00
Russell Keith-Magee
794690c272
Fixed #13090 -- Corrected handling of errors in middleware when DEBUG=False. Thanks to EroSennin for the report, and Ivan Sagalaev for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-12 16:45:29 +00:00
Adrian Holovaty
7d9de178e7
Fixed #6094 again -- fixed broken unit tests. Thanks, isagalaev
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 18:48:08 +00:00
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
Adrian Holovaty
ca6f64a43f
Fixed #6094 -- Middleware exceptions are now caught by the core handler. Thanks, isagalaev
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 17:35:01 +00:00
Brian Rosner
6c61ca3d74
Fixed #5034 -- honor request.urlconf in reverse and resolve.
...
This enables {% url %} to honor request.urlconf set from process_request
middleware methods.
Thanks SmileyChris for the initial patch work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-16 01:58:00 +00:00
Russell Keith-Magee
d2321e37eb
Fixed #11660 -- Corrected the CONTENT_TYPE and CONTENT_LENGTH headers provided by the mod_python handler. Thanks to Nowell Strite and Tareque Hossain for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-12 21:28:01 +00:00
Jacob Kaplan-Moss
b2645a15fd
Reverted [10346] because it effectively breaks USE_I18N by forcing import of translation before settings are ready.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 21:58:38 +00:00
Jacob Kaplan-Moss
c4f7bf8312
Fixed #9847 : mark the permission denied message for translation.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01 21:46:42 +00:00
Jacob Kaplan-Moss
c485e236bd
Fixed #8193 : all dynamic imports in Django are now done correctly. I know this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett!
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 16:55:59 +00:00
Malcolm Tredinnick
bd6fc4848e
Fixed a problem from r10036. Fixed #10470 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-12 07:57:35 +00:00
Malcolm Tredinnick
6483fdf1fa
Fixed #10470 -- Fixed a race condition in middleware initialization.
...
Thanks to Travis Terry and mrts.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-12 07:27:47 +00:00
Malcolm Tredinnick
d01c17e81d
Fixed #9469 -- Apply the fix from r9189 to the WSGI handler as well.
...
This is a defensive encoding fix. No functionality change for correct URLs.
Patch from magneto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9996 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08 09:58:40 +00:00
Malcolm Tredinnick
2967106274
Fixed #2782 -- Make the server port available through the modpython handler.
...
(Originally applied in r3866, reverted in r3927 and now verified as correct).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-21 12:00:51 +00:00
Malcolm Tredinnick
2ae36375fc
Fixed #9224 -- Prevent a crash when certain query strings are sent using
...
modpython.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-07 10:39:16 +00:00
Malcolm Tredinnick
36f8b8d687
Fixed #9014 -- Check that we really are processing a POST before processing
...
POST data. Some nice debugging form aaron to track this down.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9064 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 09:02:25 +00:00
Jacob Kaplan-Moss
15644cb255
Fixed #8622 : accessing POST after a POST handling exception no longer throws the server into an infinite loop. Thanks to vung for tracking this one down and fixing it.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 19:56:14 +00:00
Malcolm Tredinnick
948a833eb7
Fixed #8490 -- Worked around a bug in flup 1.0.1 when working out the correct
...
path_info setting in the WSGI handler. Thanks, Mike Richardson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 02:42:39 +00:00
Malcolm Tredinnick
77bf14d581
Fixed #8259 -- Handle an error situation that we should never see, but still
...
occurs for some reason (be liberal in what you accept, and all that). Patch
from kevin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 18:08:28 +00:00
Russell Keith-Magee
e054295fed
Fixed #8136 : Added a signal emission when an error is raised handling an error. This was required for the test client to handle missing 404.html templates and errors in the 404.html template. Thanks to danfairs for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22 13:59:41 +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
Malcolm Tredinnick
c236874c48
Fixed #7871 -- Added some more bullet-proofing in PATH_INFO determination,
...
since Django would like it to at least contain a '/' (rather than being an
empty string).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8032 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 22:13:56 +00:00
Malcolm Tredinnick
bfcecbffd3
Changed/fixed the way Django handles SCRIPT_NAME and PATH_INFO (or
...
equivalents). Basically, URL resolving will only use the PATH_INFO and the
SCRIPT_NAME will be prepended by reverse() automatically. Allows for more
portable development and installation. Also exposes SCRIPT_NAME in the
HttpRequest instance.
There are a number of cases where things don't work completely transparently,
so mod_python and fastcgi users should read the relevant docs.
Fixed #285 , #1516 , #3414 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 07:57:10 +00:00
Malcolm Tredinnick
189c704ae6
Revert [7991] - [7993]. I was committing from the wrong branch. Sorry 'bout
...
that, folks. :-(
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:37:55 +00:00
Malcolm Tredinnick
99bbaa0090
Allow avoidance of the Apache mod_rewrite undo.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:32:12 +00:00
Malcolm Tredinnick
b653cdcfb2
First part of setting request.path correctly.
...
Still needs:
- testing
- docs changes
- some way of fixing reverse().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:32:01 +00:00
Malcolm Tredinnick
795b6a1271
Fixed #7471 -- If the 400 response handler raises an exception, pass control to
...
the 500 handler (if that then raises an exception, it's just not your day).
Patch from Leah Culver.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 18:49:49 +00:00
Malcolm Tredinnick
57bb10e6c4
Refactored the HTTP 500 error response creation slightly. Provides the ability
...
for subclassing that piece of the processing path.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-15 19:17:49 +00:00
Malcolm Tredinnick
8975bba742
Fixed #4148 -- Changed the way attachments are served to IE to avoid some
...
caching and header-related bugs there. Only comes into play when Internet
Explorer is the user-agent.
Patch from Michael Axiak, with testing from Axis_of_Entropy and Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07 01:45:19 +00:00
Jacob Kaplan-Moss
d725cc9734
Fixed #2070 : refactored Django's file upload capabilities.
...
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues.
This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01 15:10:51 +00:00
Luke Plant
8c9fceebb1
Added DEBUG_PROPAGATE_EXCEPTIONS setting that helps testing under e.g. twill
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-16 23:24:36 +00:00
Gary Wilson Jr
d73c70d1ed
Fixed #5595 -- Made `ModPythonRequest.__repr__` return a string instead of a unicode object. Fixes the printout of the request object in those server error e-mails I never get :)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-08 03:06:30 +00:00
Jacob Kaplan-Moss
03ebd159a0
Fixed #4701 -- sys.exit() will no longer get swallowed by the http handler. Slightly backwards compatible, perhaps, but you really shouldn't be sys.exit()ing in view code anyway. Thanks, Bastian Kleineidam.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7168 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-28 01:52:59 +00:00
Malcolm Tredinnick
050b8a436a
Fixed #6305 -- Always emit the got_request_exception signal, even when
...
DEBUG=True. Patch from Collin Anderson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 04:06:35 +00:00
Gary Wilson Jr
c882d7c99c
Re-organized imports in handler modules to adhere to Django coding style.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 02:22:19 +00:00
Malcolm Tredinnick
3ee3d6b5f3
Fixed #5898 -- Changed a few response processing paths to make things harder to get wrong and easier to get right. Previous behaviour wasn't buggy, but it was harder to use than necessary.
...
We now have automatic HEAD processing always (previously required ConditionalGetMiddleware), middleware benefits from the Location header rewrite, so they can use relative URLs as well, and responses with response codes 1xx, 204 or 304 will always have their content removed, in accordance with the HTTP spec (so it's much harder to indavertently deliver invalid responses).
Based on a patch and diagnosis from regexbot@gmail.com .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 03:55:44 +00:00
Malcolm Tredinnick
375a6d78cb
Fixed #3496 -- Handle the case of missing (and hence '0') Content-Length header
...
in a POST to the wsgi handler. Based on a patch from Mikko Ohtamaa.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 23:52:08 +00:00
Malcolm Tredinnick
f34935c37f
Slightly changed the way we handle non-UTF-8 encoded URIs (see [6475]). Made it
...
easier to subclass the current behaviour, if needed. Fixed #5738 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6550 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 07:42:34 +00:00
Adrian Holovaty
8ae74eae55
Fixed #5738 -- Fixed bug with defective Unicode strings in a URL
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-13 02:57:57 +00:00
Gary Wilson Jr
39d61439e0
Re-organized imports to adhere to PEP 8.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6430 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-27 17:01:34 +00:00