Marc Tamlyn
58683e9c82
Fixed #16744 -- Class based view should have the view object in the context
...
Updated the most recent patch from @claudep to apply again and updated
the documentation location.
2012-08-18 15:07:21 +01:00
Aymeric Augustin
c5ef65bcf3
[py3] Ported django.utils.encoding.
...
* Renamed smart_unicode to smart_text (but kept the old name under
Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
and smart_bytes under Python 2 (which is backwards compatible).
Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
ee191715ea
[py3] Fixed access to dict keys/values/items.
2012-08-07 12:00:22 +02:00
Florian Apolloner
4b5cb116e3
Fixed error message in detail generic view.
...
Thanks go to mitar for the report and the patch.
2012-07-25 22:46:57 +02:00
Aymeric Augustin
0d914d08a0
[py3] Updated urllib/urllib2/urlparse imports.
...
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Aymeric Augustin
bdca5ea345
[py3] Replaced unicode/str by six.text_type/bytes.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
3cb2457f46
[py3] Replaced basestring by six.string_types.
2012-07-22 09:29:54 +02:00
Adrian Holovaty
8855f9380e
Merge pull request #176 from benspaulding/ticket_18521
...
Add reST role to templates named in some view docs.
2012-07-06 12:46:26 -07:00
Claude Paroz
deed192dda
Removed usage of mimetype kwarg of HttpResponse
...
Refs #16519 .
2012-06-30 21:19:07 +02:00
Ben Spaulding
24dec9edaa
Add reST role to templates named in some view docs.
...
This makes the templates link up correctly in the admindocs.
2012-06-26 21:45:45 -05:00
Jannis Leidel
c4c7fbcc0d
Fixed #18451 -- Vastly improved class based view documentation.
...
Many thanks to Daniel Greenfeld, James Aylett, Marc Tamlyn, Simon Williams, Danilo Bargen and Luke Plant for their work on this.
2012-06-11 10:40:23 +02:00
Anssi Kääriäinen
484fcd34a4
Fixed #16418 -- Made generic views work with ModelForms
...
Generic views assumed any object's _meta will be model Options. This
is not true for ModelForms for example. Took isinstance(obj, Model)
in use instead.
2012-06-09 01:12:14 +03:00
Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Julien Phalip
f699641161
Fixed #17138 -- Made the sensitive_variables decorator work with object methods.
2012-06-03 23:44:13 -07:00
Claude Paroz
2042f537a6
Removed unneeded smart_str in generic views.
2012-05-24 23:55:50 +02:00
Aymeric Augustin
3b2993ed04
Fixed #18353 -- Inconsistency in date-based CBVs.
2012-05-24 13:02:19 +02:00
Claude Paroz
ed7ea5a602
Fixed #18113 -- Corrected get_template_names docstrings.
...
Thanks Keryn Knight for the report.
2012-05-22 13:15:28 +02:00
Aymeric Augustin
03f86a5adb
Fixed #18354 -- Performance issue in CBV.
...
Prevented repeating a query twice when the model isn't ordered by
-date_field (in Meta), allow_empty is False and pagination isn't
enabled.
2012-05-20 13:18:42 +02:00
Claude Paroz
38408f8007
Marked bytestrings with b prefix. Refs #18269
...
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
2012-05-19 17:43:34 +02:00
Aymeric Augustin
20e6973682
Fixed #18323 -- Refactored date arithmetic
...
in date based generic views, in order to deal properly with both
DateFields and DateTimeFields.
2012-05-17 17:41:37 +02:00
Aymeric Augustin
c4996df16c
Fixed #17449 -- Added OPTIONS to generic views.
...
Thanks estebistec for the report and patch.
2012-05-17 13:54:51 +02:00
Aymeric Augustin
009e237cf0
Fixed #17535 -- Optimized list generic views.
...
When allow_empty is False, prevented the view from loading
the entire queryset in memory when pagination is enabled.
2012-05-17 13:34:53 +02:00
Aymeric Augustin
fcb09b5746
Fixed #10890 : added prev/next_week in the context
...
of per-week date-based generic views. Thanks ee_lars for the report.
2012-05-14 22:40:45 +02:00
Claude Paroz
865cd35c9b
Made more extensive usage of context managers with open.
2012-05-05 14:06:36 +02:00
Aymeric Augustin
e84f79f051
Fixed #18042 -- Advanced deprecation warnings.
...
Thanks Ramiro for the patch.
2012-05-03 15:27:01 +02:00
Aymeric Augustin
78ba9670af
Fixed #18217 -- Time zone support in generic views
...
Introduced a distinct implementation depending on the type of the
date field (DateField or DateTimeField), and applied appropriate
conversions is the latter case, when time zone support is enabled.
2012-04-30 20:48:19 +02:00
Aymeric Augustin
e4d4cb6130
Simplified date-based generic views.
...
Removed a confusing helper function that was confusing -- it used
last_day to store the first day of the next month.
2012-04-30 14:45:25 +02:00
Claude Paroz
3904b74a3f
Fixed #18013 -- Use the new 'as' syntax for exceptions.
...
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Matthew Tretter
97502a96f4
Correct reference error (undefined variable)
2012-04-28 15:32:22 -04:00
Tom Terrace
a0d34348dd
fix typo: instanciating -> instantiating
2012-04-28 14:18:16 -03:00
Claude Paroz
1858e47672
Fixed #18033 -- Removed function-based generic views, as per official deprecation timeline. Rest in peace! Thanks Anssi Kääriäinen for the review.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-25 19:17:47 +00:00
Aymeric Augustin
28e5b66518
Fixed #18087 -- Prevented date-based generic views from loading entire tables in memory when pagination is enabled.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17893 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-10 20:05:46 +00:00
Claude Paroz
8663bc1103
Fixed #16074 -- Added ContextMixin to class-based generic views to handle get_context_data. Thanks emyller, Luke Plant, Preston Holmes for working on the ticket and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-06 21:24:33 +00:00
Claude Paroz
9383a2761c
Removed with_statement imports, useless in Python >= 2.6. Refs #17965 . Thanks jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Claude Paroz
c7cc4cfb9e
Fixed #16138 -- Made FormMixin get_initial return a copy of the 'initial' class variable. Thanks hanson2010, wilfred@potatolondon.com and agriffis for their work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-17 22:31:03 +00:00
Jannis Leidel
b403e43c51
Updated core base translation files with new strings. Refs #17822 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-05 02:23:17 +00:00
Jannis Leidel
4887a8de17
Fixed #16842 -- Modified the RedirectView to correctly handle query strings with percent symbols. Thanks, accuser, jamey@minilop.net and Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 16:55:56 +00:00
Paul McMillan
a3bb4df895
Improved CSRF error message.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17570 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-21 23:54:02 +00:00
Aymeric Augustin
52b06e29c7
Prevented the generic views from automatically creating a HEAD method when there is no GET. Reverts r16105, refs #17449 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-18 09:50:03 +00:00
Jannis Leidel
55aa285a33
Fixed #17643 -- Set a better stack level for the cache_page decorator deprecation warnings. Thanks, zsiciarz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:59:12 +00:00
Jannis Leidel
ec5e2f0ccc
Fixed #17460 -- Extended the HIDDEN_SETTINGS constant in with a few more sensible names of settings to hide in the debug view. Many thanks to chomik, lpiatek and tomaszrybak.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17481 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:58:45 +00:00
Jannis Leidel
f0a1633425
Fixed #17358 -- Updated logging calls to use official syntax for arguments instead of string interpolation. Thanks, spulec.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:58:36 +00:00
Jannis Leidel
4b71c9998e
Fixed #15840 -- Wrapped inner function of the condition decorator with functools.wraps to follow best practices. Thanks, zsiciarz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:57:06 +00:00
Jannis Leidel
170e5d5f74
Fixed #17458 -- Marked Http404 error messages for translation. Thanks, Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 21:01:11 +00:00
Aymeric Augustin
9cce7a5ea8
Fixed #17486 -- Updated the welcome page of new projects to reflect the new structure created by startproject. Thanks aashu_dwivedi.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-01 21:54:33 +00:00
Adrian Holovaty
98c974c70b
Fixed super-edge-case bug in debug view where exc_value.args was empty. I managed to trigger this in some template code
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 22:08:32 +00:00
Adrian Holovaty
20c8aa2a20
Fixed various dodgy behaviours
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 17:37:24 +00:00
Adrian Holovaty
8767439af4
Converted some of the built-in views to use content_type instead of mimetype HttpResponse argument. Refs #16519
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 03:53:25 +00:00
Adrian Holovaty
913b39b37f
Fixed #17422 -- Changed BaseDetailView to use *args, to be consistent with other views
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:16:52 +00:00
Aymeric Augustin
98b08bd4d4
Upgraded the date based generic views to avoid warnings when time zone support is enabled.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 15:34:08 +00:00