Commit Graph

288 Commits

Author SHA1 Message Date
Adrian Holovaty b0d380376c Fixed #7649 -- Fixed incorrect line numbering in debug view in case of empty spaces. Thanks, dusk
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-08 01:49:50 +00:00
Adrian Holovaty 16482911fd Fixed #7127 -- Fixed incorrect docstring for page_not_found() view. Thanks, kcarnold and Simon Greenhill
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 03:41:03 +00:00
Malcolm Tredinnick eb6a6c4619 Fixed #6864 -- Handle Javascript i18n when the plural form expression returns
True or False (so both booleans and integers are allowed). Thanks, Ramiro Morales.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-24 13:27:19 +00:00
Malcolm Tredinnick 0fea1348d6 Fixed #6846 -- Fixed first_on_page and last_on_page in list_detail generic
view. Thanks, trevor.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-23 05:45:59 +00:00
Malcolm Tredinnick c01e6b852a Fixed #6486 -- Added local server time to the debug output page. Patch from
Bastian Kleineidam and Thomas Güttler.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20 07:01:26 +00:00
Adrian Holovaty c016352229 Fixed #5935 -- the 'It worked' page is now served with a 200 status code, not a 404. Thanks for bringing this up, Free Neuron
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 22:21:04 +00:00
Adrian Holovaty 08d4910d69 Changed list_detail.object_list generic view to use the new Paginator class. This is backwards-compatible -- the previous 12 template context variables (has_next, has_previous, etc.) are still passed to the template, but new templates should only access the new template variables 'paginator' and 'page_obj'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 21:40:45 +00:00
Malcolm Tredinnick 73328bf8ec Fixed #6494 -- Factored out the HTML debug output into a method of its own for
reuse elsewhere. Thanks, Bastian Kleineidam.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7292 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 14:34:48 +00:00
Malcolm Tredinnick efed04b634 Fixed #5603 -- Allow customization of the language cookie name. Thanks, moe.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-29 18:38:44 +00:00
Gary Wilson Jr 5ca0b9203b Fixed #5701 -- Fixed decorators to take the name, attributes, and docstring of the function they decorate by adding a modified version of the `functools.wraps` function from Python 2.5. `wraps` has been altered to work with Django's `curry` function and with Python 2.3, which doesn't allow assignment of a function's `__name__` attribute. This fixes severaly annoyances, such as the online documentation for template filters served by the admin app. This change is backwards incompatible if, for some reason, you were relying on the name of a Django decorator instead of the function it decorates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-25 06:02:35 +00:00
Malcolm Tredinnick 787acefc73 Fixed #6423 -- Don't fall in a hole in the debug screen if somebody raises an old-fashioned string exception. Thanks, guettli.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 02:24:56 +00:00
Malcolm Tredinnick 8ce7d4740e Fixed #6359 -- Fixed an oversight in the debug output: template loaders need not have a get_source() method. Thanks, Guido van Rossum.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7063 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 02:11:58 +00:00
Malcolm Tredinnick 046d943148 Fixed #6495 -- Fixed debug traceback HTML output in the rare case when there is no source line to display. Thanks, Bastian Kleineidam.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7057 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 01:24:40 +00:00
Adrian Holovaty bd0897baa7 Corrected a typo in the debug page -- 'Share this traceback on a public Web site'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-23 22:53:30 +00:00
Malcolm Tredinnick b279b75c87 Fixed #5596 -- Changed the static view for the development server so that Django doesn't crash if somebody tries to serve a 200MB file. Patch from eibaan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 11:46:48 +00:00
Gary Wilson Jr 58b2374b68 Fixed copy-and-paste view of error page to not indent the first line of installed apps and middleware.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-11 05:39:54 +00:00
Gary Wilson Jr 3e360fc963 Fixed imports to adhere to django coding style.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6909 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-11 05:38:34 +00:00
Gary Wilson Jr c39d6e89f1 Fixed #6158 -- Display PYTHONPATH on the debug error page. Thanks, annacoder.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-11 05:22:11 +00:00
Adrian Holovaty 86c417077d Changed wording of post-to-dpaste link based on a suggestion from Mordy Ovits
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 22:20:07 +00:00
Adrian Holovaty 2863b28627 Changed 'Send to DPaste' link (from [6820]) on debug page to wording that's much less inside-basebally. Also changed it so that the button only shows up after clicking 'Switch to copy-and-paste view', so people know what they're getting into. Also unconverted some XHTML tags, as the page uses an HTML 4.01 doctype.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 06:39:05 +00:00
Malcolm Tredinnick 9075ac4b76 Fixed #685 -- archive_index() and object_list() generic views allow empty
result sets by default now. Thanks, Gary Wilson and Matt Croydon.

This is a backwards incompatible change.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 15:43:35 +00:00
Malcolm Tredinnick 13aa1970d4 Fixed #2437, #6091 -- Added "paste to dpaste" button to debug page. Thanks,
Christian Metts, Erik Karulf, Simon Greenhill, dummy@habmalnefrage.de.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 00:00:36 +00:00
Adrian Holovaty 7628381eb8 Edited docstring from [6505] -- single spaces separate sentences, not double spaces.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6768 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-30 05:14:09 +00:00
Malcolm Tredinnick 8d29fabe31 Fixed #5853 -- Added handling for a missing 'en' PO file in translation support
(this file being missing is essentially harmless). Thanks, miracle2k.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 17:29:54 +00:00
Malcolm Tredinnick b6002d4af6 Fixed #1291 -- Fixed a potential infinite loop for some URL constructions in
the development server. Thanks, Graham Carlyle.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 15:47:47 +00:00
Malcolm Tredinnick 116b9d06cc Fixed #5974 -- Added autoescaping for source code lines and local variables in
technical debug page.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-20 01:37:16 +00:00
Malcolm Tredinnick 356662cf74 Implemented auto-escaping of variable output in templates. Fully controllable by template authors and it's possible to write filters and templates that simulataneously work in both auto-escaped and non-auto-escaped environments if you need to. Fixed #2359
See documentation in templates.txt and templates_python.txt for how everything
works.

Backwards incompatible if you're inserting raw HTML output via template variables.

Based on an original design from Simon Willison and with debugging help from Michael Radziej.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 12:58:53 +00:00
Gary Wilson Jr 8c442f21dc Fixed #5816 -- Fixed a regression from [6333] that generates incorrect cookie "expires" dates when using a locale other than English. Introduced `http_date` and `cookie_date` utility functions. Thanks for the report Michael Lemaire. Thanks for the patch Karen Tracey and `SmileyChris`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-31 03:59:40 +00:00
Malcolm Tredinnick fcbde3cbe5 Fixed #5712 -- Added more robustness to source code display in the debug view. Our behaviour is a bit more PEP 263 compliant now, too. Thanks, Thomas Güttler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6585 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 18:15:01 +00:00
Gary Wilson Jr a3d015fad0 Added module docstring and corrected order of imports to adhere to PEP 8.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14 04:10:02 +00:00
Gary Wilson Jr d79f684f9d Fixed typo in comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-06 02:19:15 +00:00
Adrian Holovaty e6460e4134 Changed set_language() change from [6320] to use request.REQUEST, which is shorter
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 20:00:14 +00:00
Adrian Holovaty bb94a48f88 Changed set_language() redirect view to check POST data for 'next'. Thanks, msaelices
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 19:55:48 +00:00
Russell Keith-Magee b361947745 Fixed #5468 -- Fixed the handling of the context argument in direct_to_template generic views. Thanks, durdinator.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 11:12:54 +00:00
Malcolm Tredinnick 99d12c5d70 Fixed #3651 -- Changed set_language_view() to require POST request is used, in accordance with the HTTP spec (it changes the user's state). Thanks, Fraser Nevett.
This is a backwards incompatible change for anybody previously using this view.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 07:33:45 +00:00
Russell Keith-Magee 2bec822ff3 Fixed #3895 -- Added ability to customize the context variable in the archive_index generic view. Thanks to marco.giusti@gmail.com and toke-django@toke.de.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 03:54:28 +00:00
Russell Keith-Magee d14c756b5e Fixed #4919 -- Added 'last' marker on paginators. Thanks to patrick@vonautomatisch.atfor the idea, and nick@efford.org for the patch and docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6149 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 01:52:10 +00:00
Russell Keith-Magee 87e77ffca0 Fixed #1795 -- Added page_range to paginators in generic list views. Thanks to polarcowz@gmail.com and Marc Fargas <telenieko@telenieko.com> for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 01:01:02 +00:00
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
Adrian Holovaty 885dd85b5f Fixed #1785 -- debug view no longer assumes _get_lines_from_file returns None. Thanks, django@binaryfeed.org
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 23:18:22 +00:00
Luke Plant 7a62bac56e Made QuerySet slicing return IndexError instead of DoesNotExist (and related changes).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 18:46:53 +00:00
Adrian Holovaty cc4196a407 Fixed #1059 -- Fixed off-by-one line number in heading of debug error pages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 18:44:22 +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
Adrian Holovaty b1599e56b8 Fixed #1557 in trunk
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-03-30 04:43:55 +00:00
Adrian Holovaty 5beb39b896 Fixed #1457 -- Added support for if-modified-since header in django.views.static. Thanks, Shannon -jj Behrens
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-03-03 04:53:04 +00:00
Adrian Holovaty 6330e286c3 Fixed #1399 -- Added template_object_name hook to generic views. Thanks, ChaosKCW
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-03-01 03:37:57 +00:00
Adrian Holovaty 074299db83 Fixed #1420 -- Added copy-and-paste (pastebin-friendly) toggle for debug view. Thanks, jpaulofarias
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-28 15:52:57 +00:00
Jacob Kaplan-Moss da310cff67 Fixed #1033 -- pagination in object_list generic views now use 1-indexed page numbers in the URL. Thanks, Tom Tobin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2426 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-27 23:34:39 +00:00
Adrian Holovaty 47f040d2eb Fixed #1059 -- Fixed line numbers off-by-one error in debug output
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-27 22:23:24 +00:00
Adrian Holovaty 73ddfd8bd2 Fixed #1229 -- Added allow_empty argument to archive_year and archive_month date-based generic views
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2337 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-18 20:13:46 +00:00
Adrian Holovaty 6b694097dc Fixed #1302 -- Added next_month and previous_month to template context in archive_month date-based generic view. Thanks, ubernostrum
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-17 18:03:54 +00:00