Commit Graph

200 Commits

Author SHA1 Message Date
Gary Wilson Jr be39adeb28 Changed imports to adhere to PEP 8.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-07 04:11:20 +00:00
Gary Wilson Jr da5ce52061 Fixed #3134 -- Made the `archive_year` generic view consistent with the other date-based generic views by not performing an `order_by()` on the passed queryset. This change is backwards-incompatible if you were relying on `archive_year` to do the ordering for you.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6057 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-07 04:09:59 +00:00
Malcolm Tredinnick 56e28b4e8f Fixed #5085 -- In generic views, set the default name for the slug field to 'slug'. Thanks, Trevor Caira.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 12:59:41 +00:00
Adrian Holovaty 285cc6f101 Fixed #5046 -- Added 'Unicode error hint' section to debug page in the case of a UnicodeError. Thanks, Thomas Guttler
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 03:23:53 +00:00
Malcolm Tredinnick 537b16ca97 Fixed #4414 -- Fixed Javascript message translation to also work when there is more than one format marker in a string. Thanks, tobias@neuyork.de.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-11 10:51:02 +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
Adrian Holovaty c7b49792f4 Fixed #4685 -- 'View on site' now works for https URLs. Thanks, cbrand@redback.com, treborhudson@gmail.com, Jeff Hilyard
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5594 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-03 15:11:49 +00:00
Malcolm Tredinnick 880e3cfaa6 Backed out the changes in [5482] for a bit whilst some more investigation into
side-effects is done. Refs #4565.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-22 07:15:04 +00:00
Malcolm Tredinnick bccb8897e6 Fixed #4565 -- Changed template rendering to use iterators, rather than
creating large strings, as much as possible. This is all backwards compatible.
Thanks, Brian Harring.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-17 07:11:37 +00:00
Malcolm Tredinnick ca6e4f345e Fixed #4335 -- Added Python executable binary path and version to debug output.
Thanks, Pete Crosier.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-10 04:02:29 +00:00
Malcolm Tredinnick 439cb4047f Fixed #4040 -- Changed uses of has_key() to "in". Slight performance
improvement and forward-compatible with future Python releases. Patch from Gary
Wilson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 13:30:48 +00:00
Malcolm Tredinnick 43cd7bb110 Fixed #3734 -- Added support for import hooks to the debugging traceback
output. Also respect hidden traceback frames. Thanks to Armin Ronacher.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5051 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-21 04:37:31 +00:00
Malcolm Tredinnick 936a46cc89 Fixed #3034 -- Added mimetype parameter to the direct_to_template() generic
view, for consistency with the other generic views. Thanks, Paul Bx.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-09 13:11:39 +00:00
Adrian Holovaty 0e0a1dc0b7 Fixed #3942 -- Fixed potential confusion on debug 404 page by stripping initial slash from the display of the current URL. Thanks, Collin Grady
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-09 01:10:26 +00:00
Malcolm Tredinnick e5fa609ba7 Fixed #3640 -- Improved error handling in views.i18n.set_language(). Thanks
Jorge Gajon.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4708 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-12 09:21:22 +00:00
Jacob Kaplan-Moss 9368f67b2b Added a comment to the 404/500 views so that people with DEBUG=False and no 404/500 template will get a clue about which template to create.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 17:43:41 +00:00
Jacob Kaplan-Moss b7fa37f9b2 Fixed #3170: added first_on_page and last_on_page arguments to paginated generic views. Thanks, Grimboy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 04:53:44 +00:00
Adrian Holovaty 706fcec164 Copied django.forms to django.oldforms and changed all code to reference django.oldforms instead of django.forms. Updated docs/forms.txt to add 'Forwards-compatibility' section that says you should not be using django.oldforms for any new projects.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 18:00:50 +00:00
Adrian Holovaty 9c44d8b60b Fixed #3072 -- Fixed docstring in object_detail() generic view. Thanks, Matt McClanahan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-27 23:38:49 +00:00
Adrian Holovaty 41d11a685f Fixed #2968 -- Changed arguments to __import__ to use empty dictionary instead of empty string, for stricter compliance with Python library reference. Thanks for the patch, Yasushi Masuda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30 20:50:27 +00:00
Russell Keith-Magee 6d1335c058 Fixes #2966 -- Added extra_context parameter to direct_to_template generic view to keep it aligned with capabilities of other generic views. Thanks, wam-djangobug@wamber.net.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30 14:30:43 +00:00
Russell Keith-Magee cb93c0d0da Fixes #2964 -- Fixed typo in regex in docstring for redirect_to. Thanks, wam-djangobug@wamber.net.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3948 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30 13:49:45 +00:00
Malcolm Tredinnick 11416e4a54 Fixed #2362 -- Corrected the way we retrieve an object so that it works for
one-to-one fields.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 04:11:30 +00:00
Malcolm Tredinnick 8f7ab8efed Avoid displaying the profanities list in the debug output. Makes it a bit more
"safe for work".


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-24 10:30:15 +00:00
Adrian Holovaty 6417d6c7c3 Added some escaping of request.path to django/views/debug.py. Thanks, Simon Greenhill
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-05 00:26:14 +00:00
Adrian Holovaty b7a352d78f Changed template names from [3707] to remove initial caps, to fit our style.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-04 23:49:14 +00:00
Russell Keith-Magee d043200077 Refs #2333 - Re-added the template rendering signal for testing purposes; however, the signal is not available during normal operation. It is only added as part of an instrumentation step that occurs during test framework setup. Previous attempt (r3659) was reverted (r3666) due to performance concerns.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-02 09:26:24 +00:00
Adrian Holovaty 2c2653db9f Reverted [3659], the 'name' field on Template objects and the signal emitted whenever a template is rendered. Refs #2333.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27 18:10:32 +00:00
Russell Keith-Magee 89fa97b837 Refs #2333 - Added a signal that is emitted whenever a template is rendered, and added a 'name' field to Template to allow easy identification of templates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27 12:35:07 +00:00
Adrian Holovaty ff5e01db5d Fixed #2471 -- Got date-based generic views working with SQLite DateFields. Thanks for the patch, Steven Armstrong
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3633 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-21 17:40:54 +00:00
Adrian Holovaty a8705cec47 Fixed #2524 -- Added i18n hooks in create_update generic views. Thanks, mir@noris.de
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3559 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-11 19:17:46 +00:00
Adrian Holovaty ecdd6ae6de Fixed #2433 -- Added allow_future option to date-based generic views
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-27 16:36:02 +00:00
Malcolm Tredinnick 20831e0d2f Fixed #2399 -- restored HttpResponse (overly enthusiastic pruning in r3414).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3421 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-22 06:13:49 +00:00
Jacob Kaplan-Moss a926046ba6 Second half of little cleanup tweaks suggested by pyflakes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21 20:39:17 +00:00
Jacob Kaplan-Moss e9a236d86c Fixed #2092: added a "is_secure()" method to HttpRequest which correctly handles the subtleties of mod_python's interaction with os.environ. This one's been bugging me for about a *year*, so many many thanks to k.shaposhnikov@gmail.com for figuring it out, and Tim Shaffer for pointing out this ticket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21 16:20:22 +00:00
Malcolm Tredinnick 51705f60b1 Fixed #2332 -- Introduced is_authenticated() method on User and AnonymousUser classes. Recommended its use over is_anonymous in the docs. Changed internal Django use to match this recommendation. Thanks to SmileyChris and Gary Wilson for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-19 02:09:26 +00:00
Adrian Holovaty 31eb140b5a Optimized JavaScript in django/views/i18n.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 03:17:18 +00:00
Adrian Holovaty 4a324ba7ac Added USE_I18N setting, which lets you turn off internationalization overhead with a single setting. Defaults to True. Currently only affects the admin i18n JavaScript, but I'll be adding other optimizations.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 03:09:14 +00:00
Adrian Holovaty 10229c4a1e Changed default 500 view NOT to use RequestContext, to lessen the chance that the 500 view would raise an error in itself
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-22 16:28:40 +00:00
Adrian Holovaty dc4f726df9 Fixed #688 -- Changed default 404 and 500 views to use RequestContext
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 14:07:48 +00:00
Adrian Holovaty 37addba352 Converted request.META['REQUEST_METHOD'] calls to request.method, throughout the Django codebase
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:34:13 +00:00
Adrian Holovaty a09682fd63 Fixed #2185 -- Changed django.views.decorators.http.require_http_methods decorator to use HttpResponseNotAllowed instead of HttpResponseForbidden
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 03:17:57 +00:00
Malcolm Tredinnick d5377fc813 Fixed #2153 -- display debugging template even if no stack frame is found.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-14 11:44:56 +00:00
Jacob Kaplan-Moss efcb5912e4 Fixed #2147: file uploads within the update_object generic view now works. Thanks, parlar.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3123 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-13 21:47:40 +00:00
Adrian Holovaty fc2a02f966 Fixed #2075 -- Added 'page' parameter to object_list generic view. Thanks, kanashii@kanashii.ca
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03 22:06:48 +00:00
Luke Plant 9b86db9bf2 Eliminated lots of mutable default arguments (since they are bugs
waiting to happen and are memory leaks too).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3070 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03 13:37:34 +00:00
Adrian Holovaty 5077f9ceaf Fixed #697 -- Added make_object_list parameter to archive_year generic view. Thanks, jhf@hex.no
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-01 04:21:26 +00:00
Adrian Holovaty 9030236652 Fixed #2000 -- Added 'mimetype' parameter to generic views. Thanks, Ian Holsman
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-31 15:08:06 +00:00
Luke Plant 23269289be Negligible code cleanup for the sake of clarity.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-23 19:34:43 +00:00
Adrian Holovaty d9aaa1ca86 Fixed #1931 -- update_object generic view no longer assumes the object's get_absolute_url() doesn't change. Thanks, marcink@elksoft.pl
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-22 02:02:23 +00:00