0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00
Commit Graph

15391 Commits

Author SHA1 Message Date
Tim Graham
b0ce6fe656 Fixed #20922 -- Allowed customizing the serializer used by contrib.sessions
Added settings.SESSION_SERIALIZER which is the import path of a serializer
to use for sessions.

Thanks apollo13, carljm, shaib, akaariai, charettes, and dstufft for reviews.
2013-08-22 13:58:26 -04:00
Lukasz Balcerzak
9d1987d767 Fixed #19303 -- Fixed ModelAdmin.formfield_overrides on fields with choices 2013-08-22 11:50:52 -04:00
Rainer Koirikivi
65cf82bd08 Fixed #20934 -- Avoided NoReverseMatch in ModelAdmin.changelist_view
The view tried to display links to a ModelAdmin's change_view, which
resulted in NoReverseMatches if get_urls was overridden to remove the
corresponding url.
2013-08-22 10:08:54 -04:00
Anssi Kääriäinen
6af05e7a0f Fixed model.__eq__ and __hash__ for no pk value cases
The __eq__ method now considers two instances without primary key value
equal only when they have same id(). The __hash__ method raises
TypeError for no primary key case.

Fixed #18864, fixed #18250

Thanks to Tim Graham for docs review.
2013-08-22 17:24:07 +03:00
Tim Graham
768bbf3efe Revert "Fixed #20956 -- Removed useless check in django.db.utils"
This reverts commit ce0e86cf76.

The check is necessary if 'ENGINE' is an empty string.
Thanks apollo13 for pointing this out.
2013-08-22 09:47:17 -04:00
Kevin Christopher Henry
2e926b041c Documentation -- Clarified use of 'view' in test client introduction. 2013-08-22 09:37:03 -04:00
Marc Tamlyn
bac4d03ce6 Fixed #20944 -- Removed inaccurate statement about View.dispatch(). 2013-08-22 09:20:50 -04:00
Dima Kurguzov
ce0e86cf76 Fixed #20956 -- Removed useless check in django.db.utils 2013-08-22 08:53:14 -04:00
Ramiro Morales
297f5af222 Made description of LANGUAGE_CODE setting more clear. 2013-08-22 08:27:04 -03:00
Claude Paroz
8cd8742981 Moved translator comment just above the target string 2013-08-22 09:52:54 +02:00
Anssi Kääriäinen
8d65b6082c Fixed #20955 -- select_related regression
In cases where the same connection (from model A to model B along the
same field) was needed multiple times in a select_related query, the
join setup code mistakenly reused an existing join.
2013-08-22 10:51:07 +03:00
Tim Graham
c5f768f8cc Merge pull request #1502 from marfire/doc_modelvalid
Documentation -- Corrected error about Model.full_clean()
2013-08-21 14:45:44 -07:00
Kevin Christopher Henry
bb011cf809 Documentation -- Corrected error about Model.full_clean()
Although the ModelForm validation code was changed to call
Model.full_clean(), the documentation still said otherwise. The
offending phrase was removed.
2013-08-21 15:38:07 -04:00
Tim Graham
0073f1d94f Fixed #20949 -- Typo #2 in docstring 2013-08-21 10:50:08 -04:00
Daniele Procida
17fb5768e0 Merge pull request #1498 from evildmp/add-myself
Added Daniele Procida to the committers list.
2013-08-21 07:16:37 -07:00
evildmp
082b0638ef Added myself to the committers list. 2013-08-21 16:10:51 +02:00
Tim Graham
d3ed15b79d Fixed docstring typo, thanks minddust. 2013-08-21 09:01:52 -04:00
Tim Graham
f7290581fe Fixed a regression with get_or_create and virtual fields.
refs #20429

Thanks Simon Charette for the report and review.
2013-08-21 08:30:21 -04:00
Ramiro Morales
a5cf5da50d Switched mail tests to SimpleTestCase. 2013-08-21 07:48:16 -03:00
Ramiro Morales
ececbe77ff Fixed #12422 -- Don't override global email charset behavior for utf-8.
Thanks simonb for the report, Claude Paroz and Susan Tan for their work
on a fix.
2013-08-21 07:44:20 -03:00
Anssi Kääriäinen
b065aeb17f Fixed #20946 -- model inheritance + m2m failure
Cleaned up the internal implementation of m2m fields by removing
related.py _get_fk_val(). The _get_fk_val() was doing the wrong thing
if asked for the foreign key value on foreign key to parent model's
primary key when child model had different primary key field.
2013-08-21 08:32:19 +03:00
Kevin Christopher Henry
83e434a2c2 Documentation - Noted that OneToOneField doesn't respect unique.
Added OneToOneField to the list of model fields for which the unique
argument isn't valid. (OneToOneFields are inherently unique, and if
the user supplies a value for unique it is ignored / overwritten.)
2013-08-20 21:20:29 -07:00
Ramiro Morales
deebb1a977 Import test case classes from their public API module. 2013-08-20 22:23:41 -03:00
Ramiro Morales
f9d1d5dc13 Fixed #18967 -- Don't base64-encode message/rfc822 attachments.
Thanks Michael Farrell for the report and his work on the fix.
2013-08-20 22:17:26 -03:00
Florian Apolloner
96346ed5ad Fixed #20933 -- Allowed loaddata to load fixtures from relative paths. 2013-08-20 21:25:57 +02:00
Simon Charette
859e678b3d Oracle also treats NULLs as largests values when ordering. 2013-08-20 12:28:59 -04:00
Anssi Kääriäinen
86f4459f9e Fixed invalid testing fixture 2013-08-20 17:48:02 +03:00
Anssi Kääriäinen
1ed77e7782 Fixed #20820 -- Model inheritance + m2m fixture loading regression
Tests by Tim Graham, report from jeroen.pulles@redslider.net.
2013-08-20 16:54:05 +03:00
Anssi Kääriäinen
8dc76c4b91 Fixed test failure caused by different NULL ordering between backends 2013-08-20 11:33:44 +03:00
Anssi Kääriäinen
905409855c Fixed #14056 -- Made sure LEFT JOIN aren't trimmed in ORDER BY
If LEFT JOINs are required for correct results, then trimming the join
can lead to incorrect results. Consider case:

TBL A: ID | TBL B: ID  A_ID
       1           1   1
       2
Now A.order_by('b__a') did use a join to B, and B's a_id column. This
was seen to contain the same value as A's id, and so the join was
trimmed. But this wasn't correct as the join is LEFT JOIN, and for row
A.id = 2 the B.a_id column is NULL.
2013-08-20 10:55:00 +03:00
Anssi Kääriäinen
b53ed351b3 Fixed #14043 -- Made sure nullable o2o delete works as expected
There was an old complaint about nullable one-to-one field cascading
even when the o2o field was saved to None value before the deletion.
Added an test to verify this doesn't happen.

Also some PEP 8 cleanup.
2013-08-20 09:50:37 +03:00
Simon Charette
e55ca60903 Fixed #20943 -- Weakly reference senders when caching their associated receivers 2013-08-20 01:53:58 -04:00
Simon Charette
fdbf492946 Fixed an aggregation test failure on MySQL. 2013-08-19 20:39:30 -04:00
Simon Charette
ac0e41e2c4 Avoid importing the deprecated django.utils.importlib package. 2013-08-19 19:42:53 -04:00
Simon Charette
b9590a6935 Correctly format missing Pillow/PIL exceptions messages. refs #19934 2013-08-19 18:42:48 -04:00
Rainer Koirikivi
3c03004050 Fixed #20640 -- Avoided NoReverseMatch in get_deleted_objects
The default delete action resulted in a NoReverseMatch if it were to
list any Model with a ModelAdmin with `get_urls` overridden to remove
the change url.  Catching the error and not displaying the link in that
case, as was already done for models with no registered admins.

Thanks Keryn Knight for the report.
2013-08-19 12:01:33 -04:00
Anssi Kääriäinen
ddeb20e31b Fixed GIS regression caused by force_subq
Caused by commit 7737305a4f
2013-08-19 16:35:11 +03:00
Tim Graham
7b69c3e775 Removed versionadded/changed annotations for 1.5 2013-08-19 09:09:41 -04:00
Anssi Kääriäinen
58c6d0209d Fixed #12807 -- EmptyResultSet ORed condition
The EmptyResultSet wasn't treated correctly so the end results was
incorrect, too. The bug had been already fixed in master so only tests
added.
2013-08-19 16:24:45 +03:00
Anssi Kääriäinen
7bc57a6d71 Fixed #11881 -- removed junk from aggregation subqueries
There were clauses that weren't needed in the subqueries. These were
ORDER BY, SELECT FOR UPDATE and related selections.
2013-08-19 16:15:09 +03:00
Anssi Kääriäinen
7737305a4f Fixed #12886 -- aggregation over sliced queryset 2013-08-19 16:00:17 +03:00
Anssi Kääriäinen
7d28bed13b PEP 8 cleanup 2013-08-19 14:16:10 +03:00
Anssi Kääriäinen
630b9df42f Fixed #12567 -- Incorrect SQL in model inheritance case
An isnull lookup produced incorrect SQL. This was already fixed
earlier, so only tests added.
2013-08-19 14:10:03 +03:00
Anssi Kääriäinen
3844089edc Fixed #20777 -- Admin proxy model deletion regression
Added proxy_models tests by Harm Geerts <github@geertswei.nl>.
2013-08-19 09:51:41 +03:00
Anssi Kääriäinen
4668c142dc Made Model.__eq__ consider proxy models equivalent
Fixed #11892, fixed #16458, fixed #14492.
2013-08-19 09:51:28 +03:00
Alex Gaynor
4090982617 Some code simplification 2013-08-18 09:43:41 -07:00
Alex Gaynor
aa01c99f55 Merge pull request #1479 from nickbruun/ticket_20924
Proxy __len__ and __contains__ for LazyObject
2013-08-18 09:41:43 -07:00
Nick Bruun
7a698c05b5 Update LazyObject method proxy declarations to simpler form. 2013-08-18 15:58:55 +02:00
Carl Meyer
c2907a6e3d Remove the last FIXME from the howto-release-Django doc. 2013-08-16 23:55:43 -06:00
Harm Geerts
240886183b Fixed #20829 -- Skip postgis metadata tables with introspection 2013-08-16 21:14:29 +02:00