Ian Clelland
3629a159f9
PEP 302 source loaders already decode appropriately
2012-10-26 01:40:32 +01:00
Aymeric Augustin
4b27813198
Fixed #7581 -- Added streaming responses.
...
Thanks mrmachine and everyone else involved on this long-standing ticket.
2012-10-20 20:05:11 +02:00
Claude Paroz
4797ad80da
[py3] Decoded the parsed source file encoding in debug view
2012-10-08 10:06:56 +02:00
Claude Paroz
8bd7b598b6
Fixed #18807 -- Made 404.html and 500.html optional
...
Thanks Aymeric Augustin for the report and Jannis Leidel for the
review.
2012-09-30 23:16:19 +02:00
Claude Paroz
6c2faaceb0
Made more extensive use of get_current_site
...
Refs #15089
2012-09-28 20:33:05 +02:00
Claude Paroz
3cbe686af6
Fixed #18675 -- Fixed was_modified_since with floating-point mtime
...
Thanks Simon Charette for the patch.
2012-09-26 21:12:56 +02:00
Aymeric Augustin
baa33cd8fa
Fixed #16218 -- date_list order in generic CBVs.
...
Thanks nnrcschmdt for the report and bpeschier for the initial
version of the patch.
2012-09-22 11:47:34 +02:00
Claude Paroz
26ff2be787
Imported getLogger directly from logging module
...
This was a remainder of some 2.4 compatibility code.
2012-09-20 21:03:24 +02:00
Aymeric Augustin
7207327dd3
Updated docs for dates generic views.
...
Fixes #18245 . Refs #3542 .
2012-09-08 12:22:39 -04:00
Claude Paroz
ebc773ada3
Replaced many smart_bytes by force_bytes
...
In all those occurrences, we didn't care about preserving the
lazy status of the strings, but we really wanted to obtain a
real bytestring.
2012-08-29 11:20:32 +02:00
Claude Paroz
7cfe8e8fce
Fixed #11340 -- Prevented HttpResponseNotModified to have content/content-type
...
The HTTP 1.1 spec tells that the 304 response MUST NOT contain a
message body.
Thanks aparajita for the report.
2012-08-22 20:55:24 +02:00
Marc Tamlyn
8d5c11caad
Fixed #3542 -- Add support for changing granularity on ArchiveView.
...
Resolving the concept from a very old ticket in a more class-based-view
manner.
2012-08-18 17:03:57 +01:00
Marc Tamlyn
f04bb6d798
Fixed #17228 -- params context variable is inconsistent
...
Remove the params variable from the context and just put the variables
in directly.
This had not been committed previously as the original pattern was used
in the functional generic views and we wanted consistency between them,
but django.views.generic.simple.direct_to_template is now gone so we can
do it 'right'.
2012-08-18 15:07:21 +01:00
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