Commit Graph

268 Commits

Author SHA1 Message Date
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
Adrian Holovaty b3f99ec9fe Fixed #1366 -- Static-file view now escapes file names. Thanks, Kieran Holland
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-17 17:56:46 +00:00
Adrian Holovaty c12c225a66 Fixed a bunch of errors detected by pychecker -- unneeded imports and shadows of builtin variable names
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-19 01:06:12 +00:00
Adrian Holovaty 170c3be4b3 Changed debug error view to escape the exception value, so that values in angle brackets aren't hidden by browsers
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-05 16:28:25 +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 bf49a1a8f4 Removed django/views/rss, which was empty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-15 00:34:54 +00:00
Adrian Holovaty e6256ac614 Removed django/views/core, which was empty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-15 00:33:52 +00:00
Adrian Holovaty d06a12406b Fixed #998 -- Fixed edge-case bug in debug view for templates with only one line. Thanks, andy@jadedplanet.net
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-09 02:35:38 +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 668e8b3df9 Added 'It worked' page, in a empty_urlconf() view in views/debug.py. It's called if the URLconf is empty.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-07 06:02:09 +00:00
Georg Bauer 48b67fe4bb fix for a problem with djangojs missing for some languages. Thx Olivier
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1560 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-06 20:30:56 +00:00
Adrian Holovaty 85c369001b Debug 400 page now displays special error message if your URLconf is empty.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-06 05:04:56 +00:00
Georg Bauer eaed1a7ddb limit packages in javascript_catalog to settings.INSTALLED_APPS and 'django.conf'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-04 12:57:46 +00:00
Georg Bauer 5917fdcf2d added infrastructure code for later javascript translating (currently not active)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1529 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-04 12:06:16 +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 0cb2a00369 Added robots meta tag to views.static.serve to block robots from indexing and archiving the directory-index static view.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-27 14:07:04 +00:00
Adrian Holovaty 8128f440ee Fixed #903 -- Added login_url argument to user_passes_test view decorator. Didn't add it to login_required decorator because that would turn login_required into a callable decorator, which would break backwards compatibility.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-26 07:20:07 +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
Georg Bauer 84eb80bbd7 and another little fix to the email sending stuff on password_reset - using Context works much better after importing it
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-25 00:20:13 +00:00
Georg Bauer ca683d8ca5 now really fixed the source formatting. brought to you by the magics of IRC-based pair programming
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1407 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-25 00:04:06 +00:00
Georg Bauer eff2a1fde2 just another small fix to the template_debug layout
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-24 23:35:28 +00:00
Georg Bauer 73766b1f88 fixed debug view for templates so it starts counting with 1
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-24 23:31:33 +00:00
Georg Bauer 798e6d5663 mail sending used Template.render, but passed only a dictionary, not a Context object
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1404 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-24 23:10:24 +00:00
Georg Bauer f0fbd43a57 small fix to the template_debug stuff, it was dropping last characters and didn't split the first line correctly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-24 22:57:04 +00:00
Adrian Holovaty 18c7ed74e4 Fixed #896 -- Fixed error in filesystem serve view in Windows. Thanks, Petar Marić and nesh
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-24 22:41:05 +00:00
Adrian Holovaty d922825156 Fixed #892 -- TemplateDoesNotExist errors now get a 'Template-loader postmortem' section on the pretty debug page. Thanks for the idea, David Ascher
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-24 21:15:51 +00:00
Georg Bauer eab4a22596 changed the linebreaks_iter function to use str.find instead of re.finditer, because the latter one has problems with Python 2.3
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-24 00:06:36 +00:00
Adrian Holovaty 39eac9bdff Added Wilson's HTML tweaks to the template error screen
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-23 23:15:52 +00:00
Adrian Holovaty 21f2d842fa Added Wilson's CSS tweaks to the template error screen
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1380 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-23 23:12:24 +00:00
Adrian Holovaty 5d863f1fbd Fixed #603 -- Added template debugging errors to pretty error-page output, if TEMPLATE_DEBUG setting is True. Also refactored FilterParser for a significant speed increase and changed the template_loader interface so that it returns information about the loader. Taken from new-admin. Thanks rjwittams and crew
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-23 23:10:17 +00:00
Adrian Holovaty ceecf0f7de Fixed #874 -- Changed debug views to use text/html mime-type instead of DEFAULT_CONTENT_TYPE. Thanks, Sune
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-22 14:22:02 +00:00
Adrian Holovaty 57981fb2fa Changed views.defaults page_not_found and server_error to pass in optional template_name override
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-22 05:47:51 +00:00
Jacob Kaplan-Moss b4d379d5e1 Fixed #866: static.serve view no longer opens files in text mode -- thanks, Eugene
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-21 13:06:51 +00:00
Adrian Holovaty b5feff3963 Fixed #842 -- 500 error view no longer breaks for local variable named 'items'. Thanks, rjwittams
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-20 05:17:15 +00:00
Jacob Kaplan-Moss 3bbc2bd091 Fixed #825; thanks for the suggestions, aaronsw
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-17 15:27:19 +00:00
Jacob Kaplan-Moss bb505a87ac Fixed #823 - cleaned up invalid HTML in debug error template. Thanks, Sune
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-17 14:19:33 +00:00
Adrian Holovaty b1603563a3 Fixed #822 -- Changed 500 view to use disclosure triangles instead of up/down arrows. Thanks, aaronsw
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-17 03:10:03 +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 d6aa904487 Fixed #799: any setting with "SECRET" or "PASSWORD" in the name is escaped in the debug view output (this can be expanded if there are other "naughty words" we want to strip out in the future. Thanks, Ian
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-15 14:35:24 +00:00
Jacob Kaplan-Moss 065dd334de Added NOINDEX tag to debug 500 page (for robots)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-14 18:50:13 +00:00
Jacob Kaplan-Moss 0710243ea1 Added "pretty" error pages to be used when DEBUG is True.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-14 17:44:50 +00:00
Adrian Holovaty 944de9e9e6 Completely refactored legacy RSS framework to the new django.contrib.syndication package. Also added Atom support, changed the way feeds are registered and added documentation for the whole lot. This is backwards-incompatible, but the RSS framework had not yet been documented, so this should only affect tinkerers and WorldOnline. Fixes #329, #498, #502 and #554. Thanks for various patches/ideas to alastair, ismael, hugo, eric moritz and garthk
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-12 03:44:53 +00:00
Adrian Holovaty 1b035c35d9 BACKWARDS-INCOMPATIBLE CHANGE -- Moved flatpages and redirects to standalone apps in django.contrib that are NOT installed by default. See http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges for full migration information.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-11 04:45:05 +00:00
Adrian Holovaty 4345866965 Added django.core.rss.Feed -- the new RSS interface. Refs #329.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-09 00:50:01 +00:00
Adrian Holovaty f6ce403140 Small docstring change to django.views.static
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-06 21:54:37 +00:00
Jacob Kaplan-Moss 5cf8f68423 Merged i18n branch into the trunk! Fixes #65, and perhaps some others. NB: this means that the i18n branch is now obsolete and will be made read-only.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-04 04:59:46 +00:00
Jacob Kaplan-Moss f12e324332 Fixed #612 - added cache control headers (thanks, hugo)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-29 17:00:20 +00:00
Jacob Kaplan-Moss e7c870c36e Fixed #703: added decorators to require that view be called with a given HTTP REQUEST_METHOD
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-28 01:30:30 +00:00
Jacob Kaplan-Moss c3377c1eae Fixed shortcut redirect handler
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1012 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-26 14:01:53 +00:00
Adrian Holovaty 43ad69e24e Fixed #684 -- Fixed login_required and user_passes_test decorators. Thanks, rjwittams
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-23 22:42:44 +00:00
Adrian Holovaty 4f47ef85f8 Added django.views.decorators.auth.user_passes_test, which is a more generic hook into authentication based on a test. Refactored login_required to use user_passes_test
git-svn-id: http://code.djangoproject.com/svn/django/trunk@988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-22 00:04:55 +00:00
Adrian Holovaty 530f8d12b7 Removed django.views.admin. Everything has been moved to django.contrib.admin.views. Refs #627
git-svn-id: http://code.djangoproject.com/svn/django/trunk@928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-18 04:59:26 +00:00
Adrian Holovaty b4fd513f9f Moved views.admin.main to contrib.admin.views.main. Refs #627. Note that this is still backwards-compatible, assuming people are using django.conf.urls.admin as their admin URLconf
git-svn-id: http://code.djangoproject.com/svn/django/trunk@927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-18 04:58:34 +00:00
Adrian Holovaty aed1930133 Moved django.views.admin.template and django.views.admin.doc to django.contrib.admin.views. Refs #627
git-svn-id: http://code.djangoproject.com/svn/django/trunk@923 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-18 04:40:47 +00:00
Adrian Holovaty 1dc6d4b265 Changed django.views.admin.doc to use template.loader instead of template_loader
git-svn-id: http://code.djangoproject.com/svn/django/trunk@922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-18 04:36:28 +00:00
Adrian Holovaty 383704ac84 Fixed #634 -- Changed shortcut view to accept get_absolute_url()s that return URLs starting with http. Thanks, Hugo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-17 13:24:29 +00:00
Adrian Holovaty f71f854628 Fixed #626 -- Moved template modules to django.core.template package. django.core.template_loader is deprecated, in favor of django.core.template.loader.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-14 20:10:13 +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
Adrian Holovaty d65526d688 Fixed #580 -- Added mega support for generating Vary headers, including some view decorators, and changed the CacheMiddleware to account for the Vary header. Also added GZipMiddleware and ConditionalGetMiddleware, which are no longer handled by CacheMiddleware itself. Also updated the cache.txt and middleware.txt docs. Thanks to Hugo and Sune for the excellent patches
git-svn-id: http://code.djangoproject.com/svn/django/trunk@810 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-09 00:55:08 +00:00
Adrian Holovaty a5a89b5a43 Moved vary decorators from django.utils.cache to django.views.decorators.vary
git-svn-id: http://code.djangoproject.com/svn/django/trunk@809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-09 00:37:56 +00:00
Adrian Holovaty 6beab20722 Fixed #374 -- Filtering by BooleanField now works in admin with SQLite. Thanks, davidschein
git-svn-id: http://code.djangoproject.com/svn/django/trunk@804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-08 20:23:11 +00:00
Adrian Holovaty ab9aacd4db Fixed #333 and #440 -- Split DEFAULT_MIME_TYPE setting into DEFAULT_CONTENT_TYPE and DEFAULT_CHARSET. Thanks, Maniac.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-06 02:27:08 +00:00
Adrian Holovaty 261ab166ce Fixed #586 -- raw_id_admin now works with non-integer primary keys
git-svn-id: http://code.djangoproject.com/svn/django/trunk@785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-06 01:51:30 +00:00
Jacob Kaplan-Moss 022a03ab32 Fixed #541 - generic views now may take a {{{template_loader}}} argument so they can use a different template loader than Django's own. Thanks, Joao.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@734 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 23:16:29 +00:00
Jacob Kaplan-Moss 2425907eac Fixed #576 - popups no longer show "save & continue" buttons. Thanks, Hein-Pieter
git-svn-id: http://code.djangoproject.com/svn/django/trunk@731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 22:34:17 +00:00
Adrian Holovaty 26021249a4 Fixed #573 -- Added 'Add another' link to many-to-many fields in admin. Thanks, hp@syntomax.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-29 03:19:14 +00:00
Jacob Kaplan-Moss 2a072999ca Fixed type in static view URL pattern example (refs #428)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-26 13:38:49 +00:00
Adrian Holovaty 9b68dbf95e Fixed #469 -- Admin changelist no longer assumes ForeignKey has 'ordering' set when ordering by a ForeignKey field
git-svn-id: http://code.djangoproject.com/svn/django/trunk@693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-25 22:27:23 +00:00
Jacob Kaplan-Moss 572ac3e7df Fixed #428 -- added a "static pages" view. Note that this view should only be used for testing!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-25 18:45:01 +00:00
Adrian Holovaty 3dcdce4d63 Made a small improvement to django.views.core.flatfiles so that it only uses select_template if a custom template is available, so as not to hit the filesystem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-23 22:09:42 +00:00
Adrian Holovaty a39e6c91b1 Changed django.views.core.flatfiles to use get_object_or_404
git-svn-id: http://code.djangoproject.com/svn/django/trunk@676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-23 21:59:17 +00:00
Adrian Holovaty 3b49ecea63 Changed django.views.admin.template to use render_to_response, to cut on code
git-svn-id: http://code.djangoproject.com/svn/django/trunk@675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-23 21:53:53 +00:00
Adrian Holovaty a089b8f620 Changed django.views.admin.main to use get_object_or_404 and render_to_response, to cut on code
git-svn-id: http://code.djangoproject.com/svn/django/trunk@674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-23 21:52:01 +00:00
Adrian Holovaty 36fc73a45b Fixed #333 -- Added DEFAULT_MIME_TYPE setting, and set it to 'text/html; charset=utf-8' by default
git-svn-id: http://code.djangoproject.com/svn/django/trunk@670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-23 01:50:01 +00:00
Adrian Holovaty 39a907a051 Added request.session.delete_test_cookie()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-23 01:28:44 +00:00
Adrian Holovaty a7efb3939f Converted load_and_render() calls to render_to_response() because of [664].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-22 22:26:56 +00:00
Adrian Holovaty 4175aec30f Converted django.views.admin.doc to use load_and_render
git-svn-id: http://code.djangoproject.com/svn/django/trunk@660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-22 05:23:41 +00:00
Adrian Holovaty aec3e32c7b Converted django.views.auth.login to use load_and_render
git-svn-id: http://code.djangoproject.com/svn/django/trunk@659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-22 05:18:23 +00:00
Adrian Holovaty 48f0820337 Converted django.views.registration.passwords to use load_and_render -- it's less code
git-svn-id: http://code.djangoproject.com/svn/django/trunk@658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-22 05:13:15 +00:00
Adrian Holovaty bb87b2163c Fixed #525 -- admin.list_filter now works with ManyToManyFields whose primary keys are integers and are not called 'id'. Thanks for the bug report, nesh
git-svn-id: http://code.djangoproject.com/svn/django/trunk@654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-20 03:46:11 +00:00
Adrian Holovaty 66d4db7b09 Fixed #351 -- views.generic.list_detail.object_list now respects allow_empty when paginating. Thanks, kmh
git-svn-id: http://code.djangoproject.com/svn/django/trunk@618 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-09-02 22:54:12 +00:00
Adrian Holovaty e1f0accaf6 Fixed display bug in admin when deleting an object that has a OneToOneField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-30 17:03:15 +00:00
Adrian Holovaty 299c3cdd8c Fixed small bug in manipulator handling of one-to-one-related foreign keys
git-svn-id: http://code.djangoproject.com/svn/django/trunk@572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-29 16:49:18 +00:00
Adrian Holovaty b77114caaa Fixed #423 -- Fixed bug in ForeignKey admin filters. Thanks, jkocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-26 21:12:06 +00:00
Adrian Holovaty 25264c8604 Fixed #122 -- BIG, BACKWARDS-INCOMPATIBLE CHANGE. Changed model syntax to use fieldname=FieldClass() syntax. See ModelSyntaxChangeInstructions for important information on how to change your models
git-svn-id: http://code.djangoproject.com/svn/django/trunk@549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-25 22:51:30 +00:00
Jacob Kaplan-Moss 9fb3f7fa93 Fixed a small bug in admin changelist view -- the code that handles ordering by
a related field still assumed the outdated ordering syntax.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-23 20:17:36 +00:00
Adrian Holovaty 659ab9846e Fixed small bug in views.auth.login.login
git-svn-id: http://code.djangoproject.com/svn/django/trunk@520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-16 23:15:13 +00:00
Adrian Holovaty 07889c13a6 Fixed #1 -- Added anonymous session support via middleware and request.session. Removed the former request.session, which wasn't being used anyway. Removed auth.Session model. See the BackwardsIncompatibleChanges wiki page for IMPORTANT notes on code you'll have to change and a DB table you'll have to create.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-16 22:54:05 +00:00
Jacob Kaplan-Moss 7d374ad597 Added raw_id_admin support to ManyToManyField objects; fixes #260
git-svn-id: http://code.djangoproject.com/svn/django/trunk@516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-16 18:08:37 +00:00
Adrian Holovaty 935daf0626 Fixed typo in django.views.auth.login
git-svn-id: http://code.djangoproject.com/svn/django/trunk@515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-16 16:57:20 +00:00
Jacob Kaplan-Moss b149fc3671 Fixed #310 -- thanks, mordaha
git-svn-id: http://code.djangoproject.com/svn/django/trunk@492 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-12 14:19:34 +00:00
Adrian Holovaty 199938649e Fixed #81 -- Admin now supports primary_key=True for non-integer fields. Note that you'll have to make a change to your database if you're using a previous Django installation and want to use non-integer primary key fields. See the BackwardsIncompatibleChanges wiki page for info.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@469 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 19:32:38 +00:00
Adrian Holovaty b3ae12fa4a Cleaned up admin view code to use new 'pk' lookup syntax
git-svn-id: http://code.djangoproject.com/svn/django/trunk@468 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 18:46:11 +00:00
Adrian Holovaty d8f5cad47e Removed media.ljworld.com reference from admin_media/js/SelectFilter2.js. Refs #49
git-svn-id: http://code.djangoproject.com/svn/django/trunk@451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-10 01:01:54 +00:00
Adrian Holovaty 4f00611f74 Fixed #211 -- edit_inline_type is deprecated, in favor of edit_inline itself. For example, instead of 'edit_inline=True, edit_inline_type=meta.TABULAR', use 'edit_inline=meta.TABULAR'.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-09 21:08:00 +00:00
Adrian Holovaty b7e226d8b8 Fixed typos in generic-views documentation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-08 19:45:57 +00:00
Adrian Holovaty 5bb56520a5 Fixed #270 -- Admin change forms now display default values in num_extra_on_change fields with default set. Thanks for the patch, Hugo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-06 20:51:06 +00:00
Adrian Holovaty 8a9806096f Fixed #7 -- Fixed subtle admin changelist filter bug in maintaining state. Thanks for the patch, Manuzhai!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@417 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-06 20:39:43 +00:00
Adrian Holovaty b6a1105768 Updated admin doc view to reflect changes from [411]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-05 21:24:24 +00:00
Adrian Holovaty a8ecb56106 Fixed #267 -- "Save and continue editing" no longer assumes object has an ID field. Thanks, Hugo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-04 14:48:48 +00:00
Jacob Kaplan-Moss 49c6708716 Added doc view for templates that will show the search path for a given template on each site
git-svn-id: http://code.djangoproject.com/svn/django/trunk@392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-02 20:29:27 +00:00
Jacob Kaplan-Moss ce0d0cd9e2 Made a bunch of fixes to auto-generated admin documentation:
* Views are no longer "doubled"
    * Links work better (view -> model links and friends were broken)
    * Performance has been improved so now the pages no longer need to be cached.
    


git-svn-id: http://code.djangoproject.com/svn/django/trunk@391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-02 19:59:51 +00:00
Adrian Holovaty e0c3dd3318 Refactored meta.py -- created a django.core.meta package, with init.py and fields.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-08-01 21:29:52 +00:00
Adrian Holovaty 9e64035796 Changed admin views to output utf-8 charset explicitly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-29 16:32:47 +00:00
Adrian Holovaty cf9efea240 Whoop, left in an 'assert False' in [333]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-28 15:01:10 +00:00
Adrian Holovaty f5b605ab1b Fixed #218 -- Fixed admin change-list column sorting
git-svn-id: http://code.djangoproject.com/svn/django/trunk@333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-28 14:59:50 +00:00
Adrian Holovaty 9b98383175 Fixed #187 -- Made admin view handle one-to-one relationships in which the parent relationship doesn't have the 'admin' parameter set. Thanks, Moof
git-svn-id: http://code.djangoproject.com/svn/django/trunk@331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-26 23:24:55 +00:00
Adrian Holovaty 3c0c0e7317 Fixed #162 -- Admin log now records repr() before calling delete(), instead of after calling it() -- thanks, mfenniak@pobox.com!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-26 22:43:27 +00:00
Adrian Holovaty 786c750c40 Fixed #163 -- Added 'pk' database API option, which is a shorthand for (primary_key)__exact
git-svn-id: http://code.djangoproject.com/svn/django/trunk@316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-26 16:11:43 +00:00
Adrian Holovaty 7d574e8f76 Removed 'use_numeric_months' parameter in generic date views (from [308]) in favor of something more powerful -- you can now provide month_format and day_format, which are format strings that specify how you expect the month and day to be formatted in the URL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-26 03:48:41 +00:00
Jacob Kaplan-Moss 5498dbe519 Fixed #196: date-based generic views now have a "use_numeric_months" option if you'd like to use numeric months in the urls. Also fixed #183 while I was at it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-25 22:07:04 +00:00
Jacob Kaplan-Moss 6c43b0e06c Fixed #195: generic views now allow callables in extra_context dicts -- thanks, Moof!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-25 21:53:00 +00:00
Jacob Kaplan-Moss 371144f134 A bunch of generics: documentation of generic views; cleaned up existing generic views, and added create/update generic views.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-24 22:21:09 +00:00
Adrian Holovaty 768c17eda0 Fixed #168 -- admin object history was assuming primary key was named 'id'. Thanks, clintecker@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-23 15:49:26 +00:00
Adrian Holovaty 79026a6e22 Fixed #156 -- Fixed admin changelist bug as a result of ordering syntax change
git-svn-id: http://code.djangoproject.com/svn/django/trunk@296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-22 17:58:56 +00:00