Vlastimil Zíma
6de81d65f4
Fixed #14825 -- LocaleMiddleware keeps language
...
* LocaleMiddleware stores language into session if it is not present there.
2013-05-25 10:52:54 +02:00
Andrew Godwin
1514f17aa6
Rotate CSRF token on login
2013-05-24 22:15:08 +01:00
Claude Paroz
7e95d7a930
Fixed a regression in router initialization
...
Regression was introduced in 6a6bb168b
. Thanks Bas Peschier for the
report.
2013-05-24 20:48:02 +02:00
Luke Plant
17559e6eb0
Optimisation in prefetch_related_objects
2013-05-24 11:19:44 +01:00
Luke Plant
4fd94969d8
Fixed #19607 - prefetch_related crash
...
Thanks to av@rdf.ru and flarno11@yahoo.de for the report.
2013-05-24 11:10:48 +01:00
Gavin Wahl
48424adaba
Fixed #17648 -- Add `for_concrete_model` to `GenericForeignKey`.
...
Allows a `GenericForeignKey` to reference proxy models. The default
for `for_concrete_model` is `True` to keep backwards compatibility.
Also added the analog `for_concrete_model` kwarg to
`generic_inlineformset_factory` to provide an API at the form level.
2013-05-23 19:03:14 -04:00
Claude Paroz
6a6bb168be
Delayed settings.DATABASE_ROUTERS usage by ConnectionRouter
...
Refs #20474 .
2013-05-23 15:19:12 +02:00
Claude Paroz
2d8c132b18
Delayed settings.DATABASES usage by ConnectionHandler
...
Refs #20474 .
2013-05-23 15:19:12 +02:00
Claude Paroz
499a745ae1
Fixed #20474 -- Proxied and deprecated django.db.backend
2013-05-23 15:19:12 +02:00
Claude Paroz
b664cb818d
Fixed #19237 (again) - Made strip_tags consistent between Python versions
2013-05-23 14:01:27 +02:00
Ramiro Morales
8c2fd050f8
Made fix for #9321 less buggy and more effective.
...
Don't try to be smart about building a good-looking help string
because it evaluates translations too early, simply use the same old
strategy as before. Thanks Donald Stufft for the report.
Also, actually fix the case reported by the OP by special-casing
CheckboxSelectMultiple.
Added tests.
Refs #9321 .
2013-05-23 07:49:29 -03:00
Donald Stufft
3de1288042
Fixed #11398 - Added a pre_syncdb signal
2013-05-23 01:09:22 -04:00
Russell Keith-Magee
11b06532f7
Merge pull request #1198 from KrzysiekJ/http-patch-method
...
Fixed #20478 – Added support for HTTP PATCH method in generic views.
2013-05-22 17:19:43 -07:00
Claude Paroz
51998dffe7
Removed check for 0.15 version of gettext tools
...
gettext 0.15 has been released in July 2006.
2013-05-22 18:21:33 +02:00
Claude Paroz
dc51ec8bc2
Fixed #19237 -- Used HTML parser to strip tags
...
The regex method used until now for the strip_tags utility is fast,
but subject to flaws and security issues. Consensus and good
practice lead use to use a slower but safer method.
2013-05-22 17:34:02 +02:00
Krzysztof Jurewicz
ee8b810b97
Fixed #20478 – Added support for HTTP PATCH method in generic views.
2013-05-22 14:48:11 +02:00
Aymeric Augustin
0e51d8eb66
Fixed #20463 -- Made get_or_create more robust.
...
When an exception other than IntegrityError was raised, get_or_create
could fail and leave the database connection in an unusable state.
Thanks UloPe for the report.
2013-05-22 10:56:06 +02:00
Marc Tamlyn
adeec00979
Merge pull request #246 from dekkers/ticket_18709
...
Fixed #18709 -- Check if initial_value is a callable
2013-05-22 00:45:07 -07:00
Jeroen Dekkers
d0788c2770
Fixed #18709 -- Check if initial_value is a callable
...
In _get_changed_data, check if initial_value is a callable and call it
if it is.
2013-05-22 01:05:22 +02:00
Shai Berger
dfe6ea3b1f
Fixed #20012 -- test_year_lookup_edge_case fails under Oracle
...
Used formatted date instead of datetime object for the end of the
year range, as the datetime object loses fractions-of-seconds when
inserted into the db.
2013-05-22 01:52:15 +03:00
Shai Berger
8fd40b9ae7
Fixed #20015 -- date__startswith('2008') fails under Oracle
...
Removed the explicit casting of strings to dates
2013-05-22 01:52:15 +03:00
Shai Berger
b6ad9998e6
Fixed #20453 -- inspectdb test failure on Oracle
2013-05-22 01:52:15 +03:00
Anssi Kääriäinen
70679243d1
Fixed #18702 -- Removed chunked reads from QuerySet iteration
2013-05-21 19:51:59 +03:00
Selwin Ong
ea9a0857d4
Fixed #19326 -- Added first() and last() methods to QuerySet
2013-05-21 18:52:28 +03:00
Claude Paroz
d595b61aca
(Re-)moved some imports
2013-05-21 17:34:19 +02:00
Mathijs de Bruin
61a8de6f4f
Fixed #6412 -- More details if a template file cannot be loaded
...
Report more details about template files in loader postmortem.
2013-05-21 16:59:40 +02:00
Claude Paroz
fd961941cc
Imported copyreg from six.moves
2013-05-21 14:41:39 +02:00
Wiktor Kolodziej
cec9558fba
Fixed #17308 -- Enabled the use of short_description on properties in the admin.
2013-05-21 13:19:18 +02:00
Aymeric Augustin
18856f866c
Merge pull request #1191 from ambv/content_is_bytes
...
Fixed #20472 : response.content should be bytes on both Python 2 and 3
2013-05-21 01:26:35 -07:00
Daniel Lindsley
e24d486fbc
Fixed #20212 - __reduce__ should only be defined for Py3+.
2013-05-21 00:49:21 -07:00
Łukasz Langa
0594fed9ff
Fixed #20472 : response.content should be bytes on both Python 2 and 3
2013-05-21 01:28:16 +02:00
Ramiro Morales
4ba1c2e785
Fixed #9321 -- Deprecated hard-coding of help text in model ManyToManyField fields.
...
This is backward incompatible for custom form field/widgets that rely
on the hard-coded 'Hold down "Control", or "Command" on a Mac, to select
more than one.' sentence.
Application that use standard model form fields and widgets aren't
affected but need to start handling these help texts by themselves
before Django 1.8.
For more details, see the related release notes and deprecation timeline
sections added with this commit.
2013-05-20 16:29:51 -03:00
Jorge Bastida
888c86dcf3
Fixed #20445 -- Raised original exception after command error
2013-05-20 18:59:37 +02:00
Ryan Kaskel
4280217f31
Fixed #20403 -- Ignore forms marked for deletion when validating max_num.
2013-05-20 12:13:21 -04:00
Anssi Kääriäinen
266c0bb23e
Fixed #20278 -- ensured .get() exceptions do not recurse infinitely
...
A regression caused by d5b93d3281
made .get() error
reporting recurse infinitely on certain rare conditions. Fixed this by
not trying to print the given lookup kwargs.
2013-05-20 18:50:40 +03:00
Anssi Kääriäinen
c9a96075fa
Fixed #20378 -- regression in GenericRelation on abstract model
...
When a GenericRelation was defined on abstract model, queries on childs
of the abstract model didn't work. The problem was in the way fields and
in particular field.rel was copied from models to their children.
The regression was likely caused by #19385 . Thanks to Gavin Wahl for
spotting the regression.
2013-05-20 18:02:10 +03:00
Anssi Kääriäinen
f53059b411
Fixed qs.values() regression when used in subquery
2013-05-20 15:38:47 +03:00
Marc Tamlyn
6d81d5d82e
Merge pull request #1181 from aaugustin/better-api-to-disable-atomic-requests
...
Changed API to disable ATOMIC_REQUESTS per view.
2013-05-20 00:26:06 -07:00
Aymeric Augustin
6633eeb886
Changed API to disable ATOMIC_REQUESTS per view.
...
A decorator is easier to apply to CBVs. Backwards compatibility isn't an
issue here, except for people running on a recent clone of master.
Fixed a few minor problems in the transactions docs while I was there.
2013-05-19 19:53:16 +02:00
Preston Holmes
6786920fd8
Fixed #16330 -- added --pks option in dumpdata command
...
Thanks to guettli for the initial ticket and patch, with additional work
from mehmetakyuz and Kevin Brolly.
2013-05-19 09:10:40 -07:00
Aymeric Augustin
f7d7d2be4b
Made 2d309a70
compatible with Python 3.
2013-05-19 17:58:29 +02:00
Russell Keith-Magee
a4ab0e8b86
Merge pull request #1178 from bmispelon/master
...
Fix for test failure introduced by 980ae2a
.
2013-05-19 08:08:09 -07:00
Baptiste Mispelon
3cb1e9b93c
Fix test failure introduced by 980ae2ab29
.
2013-05-19 16:51:36 +02:00
Bozidar Benko
2d309a7043
Fixed #15961 -- Modified ModelAdmin to allow for custom search methods.
...
This adds a get_search_results method that users can override to
provide custom search strategies.
Thanks to Daniele Procida for help with the docs.
2013-05-19 16:45:00 +02:00
Erik Romijn
f88700d610
Fix #19664 -- Illegal Characters In Session Key Give Fatal Error On File Backend Only
2013-05-19 15:33:05 +02:00
Aymeric Augustin
181f2ec603
Fixed test failures with Oracle when pytz isn't installed.
...
Thanks Shai Berger for the report.
2013-05-19 14:38:48 +02:00
Baptiste Mispelon
980ae2ab29
Fix #20447 : URL names given to contrib.auth.views are now resolved.
...
This commit also adds tests for the redirect feature of most auth views.
It also cleans up the tests, most notably using @override_settings instead
of ad-hoc setUp/tearDown methods.
Thanks to caumons for the report.
Conflicts:
docs/releases/1.6.txt
2013-05-19 14:36:38 +02:00
Andrew Godwin
9b22baddef
Merge pull request #1130 from vdboor/issue_20442_get_for_id
...
Fixed #20442 : NoneType error when fetching a stale ContentType with get_for_id
2013-05-19 05:33:17 -07:00
Aymeric Augustin
f7467181aa
Merge pull request #1160 from erikr/host-inet-postgres2
...
Fixed #11442 -- Postgresql backend casts all inet types to text
2013-05-19 04:57:10 -07:00
Erik Romijn
60d94c2a80
Fixed #11442 -- Postgresql backend casts all inet types to text
2013-05-19 13:28:09 +02:00
Łukasz Langa
660762681c
Fixed #20126 -- XViewMiddleware moved to django.contrib.admindocs.middleware
2013-05-19 13:18:35 +02:00
Aymeric Augustin
a7e2835276
Merge pull request #1028 from manfre/patch-2
...
Fixed #20340 - document required return value for disable_constraint_checking
2013-05-19 04:17:08 -07:00
Aymeric Augustin
cb86f707a0
Fixed #12747 -- Made reason phrases customizable.
2013-05-19 13:14:54 +02:00
Aymeric Augustin
3129d19071
Merge pull request #1152 from ambv/issue11915
...
Fixed #11915 : generic Accept-Language matches country-specific variants
2013-05-19 04:01:20 -07:00
Andrew Godwin
04e0fc029f
Merge pull request #1094 from senko/ticket_11160
...
Fixed #11160 : Formset non_form_errors returns ErrorList() if is_valid is not called
2013-05-19 03:56:14 -07:00
Andrew Godwin
7a99d1e167
Merge pull request #1134 from senko/ticket_18990
...
Fixed #18990 : Loaddata now complains if fixture doesn't exist
2013-05-19 03:54:29 -07:00
Łukasz Langa
26e3e7ecb5
Fixed #11915 : generic Accept-Language matches country-specific variants
2013-05-19 12:50:09 +02:00
Honza Kral
4ad1eb1c14
Fixed #12674 -- provide a way to override admin validation
...
Moved admin validation code to classes and have those be class
attributes to the ModelAdmin classes.
2013-05-19 12:42:52 +02:00
Senko Rasic
c44a2c40fe
Fixed #18990 -- Loaddata now complains if fixture doesn't exist
...
If the fixture doesn't exist, loaddata will output a warning.
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the warning is not emitted. This allows syncdb and
flush management commands to attempt to load it without causing
spurious warnings.
Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions
to the ticket.
2013-05-19 11:31:27 +02:00
Marc Tamlyn
413735b239
Fix a typo in a comment.
2013-05-19 11:24:36 +02:00
Andrew Godwin
2d0e36ae37
Merge pull request #1142 from Pike/master
...
Fixed #20454 : Make Urdu (ur) recognized as RTL language
2013-05-19 02:23:20 -07:00
Senko Rasic
cc3b3ba93a
Fixed #18990 : Loaddata now complains if fixture doesn't exist
...
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the error is not raised. This allows syncdb and
flush management commands to attempt to load it without causing
an error if it doesn't exist.
2013-05-19 10:56:09 +02:00
Marc Tamlyn
6fef4be632
Merge pull request #1141 from inglesp/typo
...
Typo in comment
2013-05-19 01:39:09 -07:00
Marc Tamlyn
c70ca4879e
Merge pull request #1116 from elektrrrus/ticket_20234_20236
...
Ticket 20234 20236
2013-05-19 01:32:41 -07:00
Axel Hecht
004fde0702
Make Urdu (ur) recognized as RTL language. Refs #20454
2013-05-19 11:29:24 +03:00
Peter Inglesby
cafcc22b01
Typo in comment
2013-05-19 09:28:36 +02:00
Ramiro Morales
0a50311063
Fixed #20004 -- Moved non DB-related assertions to SimpleTestCase.
...
Thanks zalew for the suggestion and work on a patch.
Also updated, tweaked and fixed testing documentation.
2013-05-18 19:04:34 -03:00
Claude Paroz
69523c1ba3
Updated contrib.humanize translation template
2013-05-18 23:11:39 +02:00
Emil Stenström
7d77e9786a
Fixed #20246 -- Added non-breaking spaces between values an units
2013-05-18 23:01:48 +02:00
Tome Cvitan
caf56ad174
Fixed #20440 -- Ensured CharField's max_length/min_length are integers
2013-05-18 22:30:24 +02:00
Karol Sikora
3eba8c7f7f
Fixed #20234 and #20236 -- SingleObjectMixin fixes
...
Added object on SingleObjectMixin returned context,
some code clanup.
2013-05-18 21:13:27 +02:00
Shai Berger
ff881aef53
Fixed #13958 -- problem reporting exception from \r-line-ended file
...
Thanks petrvanblokland for reporting and saz for the patch
2013-05-18 19:30:03 +03:00
Aymeric Augustin
5915800deb
Merge pull request #1127 from filias/20142
...
Fixed #20142 -- Added error handling for fixture setup
2013-05-18 08:42:36 -07:00
Florian Apolloner
dc8814bf7d
Merge branch 'master' of github.com:django/django
2013-05-18 17:39:14 +02:00
Łukasz Langa
bd97f7d0cb
Fixed #15201 : Marked CACHE_MIDDLEWARE_ANONYMOUS_ONLY as deprecated
2013-05-18 17:38:32 +02:00
Florian Apolloner
acd0bb39df
Fixed #14894 -- Ensure that activating a translation doesn't run into threading issues.
...
Thanks to maxbublis for the report and sergeykolosov for the patch.
2013-05-18 17:36:31 +02:00
Diederik van der Boor
86e761fee8
Fix NoneType error when fetching a stale ContentType with get_for_id
...
When a stale ContentType is fetched, the _add_to_cache() function
didn't detect that `model_class()` returns `None` (which it does by
design). However, the `app_label` + `model` fields can be used instead
to as local cache key. Third party apps can detect stale models by
checking whether `model_class()` returns `None`.
Ticket: https://code.djangoproject.com/ticket/20442
2013-05-18 17:31:28 +02:00
Donald Stufft
398841d6d3
Merge branch 'allow-any-iterable-for-choices'
2013-05-18 11:31:16 -04:00
Donald Stufft
a19e9d80ff
Fixed #20430 - Enable iterable of iterables for model choices
...
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
2013-05-18 11:14:05 -04:00
Aymeric Augustin
e73cb6391d
Merge pull request #1122 from ambv/issue13285
...
Fixed #13285 : populate_xheaders breaks caching
2013-05-18 08:05:48 -07:00
Filipa Andrade
5883ae56b3
Fixed #20142 -- Added error handling for fixture setup
...
TestCase._fixture_setup disables transactions so,
in case of an error, cleanup is needed to re-enable
transactions, otherwise following TransactionTestCase
would fail.
2013-05-18 17:05:45 +02:00
Łukasz Langa
64e11a68f1
Fixed #13285 : populate_xheaders breaks caching
2013-05-18 17:03:43 +02:00
Aymeric Augustin
3634948c88
Moved IgnorePendingDeprecationWarningsMixin in django.test.utils.
...
This mixin is useful whenever deprecating a large part of Django.
2013-05-18 16:49:15 +02:00
Olivier Sels
63a9555d57
Fixed #19436 -- Don't log warnings in ensure_csrf_cookie.
2013-05-18 16:17:46 +02:00
Aymeric Augustin
7d050e8e9c
Merge pull request #1113 from denibertovic/master
...
Fixed #18761 -- Added whitespace stripping to URLField and SlugField.
2013-05-18 07:11:11 -07:00
Deni Bertovic
186ec21a3d
Added stripping of whitespace for SlugField and URLField
2013-05-18 16:06:08 +02:00
Claude Paroz
710c59bf9b
Slightly reworked imports in contrib.auth.__init__
2013-05-18 16:01:47 +02:00
Jorge Bastida
dc43fbc2f2
Fixed #18998 - Prevented session crash when auth backend removed
...
Removing a backend configured in AUTHENTICATION_BACKENDS should not
raise an exception for existing sessions, but should make already
logged-in users disconnect.
Thanks Bradley Ayers for the report.
2013-05-18 15:58:29 +02:00
Jacob Burch
89955cc35f
Fixed #9595 -- Allow non-expiring cache timeouts.
...
Also, streamline the use of 0 and None between cache backends.
2013-05-18 15:39:42 +02:00
Florian Apolloner
e0df647143
Merge pull request #1101 from erikr/master
...
Fixed argument order for localized_fields to ensure backwards compatibility
2013-05-18 05:53:14 -07:00
Erik Romijn
1c1695668f
Fixed argument order for localized_fields to ensure backwards compatibility
2013-05-18 14:38:45 +02:00
Łukasz Langa
92ebb29c53
Fixes #19919 : get_language_from_request() disregards "en-us" and "en" languages
...
when matching Accept-Language
2013-05-18 14:37:04 +02:00
Florian Apolloner
16683f29ea
Merge pull request #1084 from erikr/master
...
Fixed #13546 -- Easier handling of localize field options in ModelForm
2013-05-18 05:15:15 -07:00
Marc Tamlyn
ef73a8eefd
Merge pull request #1083 from Markush2010/ticket20235
...
Fixes #20235 - MultipleObjectMixin requires object_list in kwargs
2013-05-18 05:14:28 -07:00
Erik Romijn
756b81dbd1
Fixed #13546 -- Easier handling of localize field options in ModelForm
2013-05-18 14:13:00 +02:00
Matthew Somerville
1c921cfac3
Fixed #20235 -- Use self.object_list if object_list not present in get_context_data kwargs.
...
This is so MultipleObjectMixin can be used in the same way as
SingleObjectMixin.
2013-05-18 14:10:40 +02:00
Senko Rasic
493aca453a
Fixed #11160 - Ensure full_clean is called from non_form_errors
...
Updated FormSet.non_form_errors() to ensure full_clean() has
been called before returning the errors.
2013-05-18 13:44:27 +02:00
Aymeric Augustin
06603d112c
Merge pull request #1090 from zyegfryed/ticket_20433
...
Fixed #20433 : extracted catalog compilation code from view.
2013-05-18 04:30:56 -07:00
zyegfryed
5e208d579d
Fixed #20433 : Extract catalog compilation code from javascript_catalog view.
2013-05-18 13:20:52 +02:00
Shai Berger
215647c0f7
Fixed #20386 - Introspection problem on Oracle
...
Made introspection always return a unicode as column name on Oracle.
Thanks aaugustin for review and suggestion to use force_text().
2013-05-18 14:19:26 +03:00