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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Adrian Holovaty
3234a932b2
Fixed #1117 -- Added HttpResponsePermanentRedirect
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-03 23:57:14 +00:00
Adrian Holovaty
49fd163a95
Fixed #925 -- Added TEMPLATE_CONTEXT_PROCESSORS, which lets you specify processesors for DjangoContext. Thanks, Luke Plant
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-24 04:39:59 +00:00
Adrian Holovaty
5cbbd364c3
Fixed #1041 -- Generic views no longer use deprecated template_loader. Thanks for the patch, Ian
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-16 04:54:18 +00:00
Adrian Holovaty
b625153b49
Fixed #992 -- Fixed bug in archive_month generic view leaving out the last day of the month. Thanks, ubernostrum
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-09 01:55:53 +00:00
Adrian Holovaty
3bf29d2184
Fixed #816 -- FileFields now work in the create_update generic view. Thanks, limodou
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-01 06:36:47 +00:00
Adrian Holovaty
bf0f6ec3b4
Added allow_empty hook to archive_index date-based generic view.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-30 22:03:50 +00:00
Adrian Holovaty
496e777da9
Fixed #947 -- Corrected is_paginated variable in list_detail generic view. Thanks, nesh
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-28 14:26:04 +00:00
Adrian Holovaty
9dda4abee1
MERGED NEW-ADMIN BRANCH (except for po/mo files, which will come in a separate commit)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-25 21:20:09 +00:00
Jacob Kaplan-Moss
400cf5658d
Added django.views.generic.simple.redirect_to view for issuing simple redirects. Also updated direct_to_template to use render_to_response to be consistant with coding style, and documented the simple generic views.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-15 17:19:33 +00:00
Jacob Kaplan-Moss
dcb5bc32e0
Added django.views.generic.simple.direct_to_template which renders a given template along with any other params from the URL pattern.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-15 16:55:26 +00:00
Jacob Kaplan-Moss
b8f70f8c94
Updated docs to reflect changes in [824]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-10 20:23:53 +00:00
Jacob Kaplan-Moss
705a2c31c1
Fixed #604 - total number of objects in generic object_list view is now available as {{ hits }}
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-10 20:18:47 +00:00