Claude Paroz
88dfe544f6
Fetched updated contrib translations from Transifex
...
Forward port of 5483c66f85
from stable/1.8.x
2015-04-01 19:51:50 +02:00
Anssi Kääriäinen
8f30556329
Renamed Field.rel attribute to remote_field
...
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
2015-03-25 08:16:12 -04:00
Karl Hobley
81e1a35c36
Fixed #24495 -- Allowed unsaved model instance assignment check to be bypassed.
2015-03-18 19:00:09 -04:00
Loic Bistuer
bed504d70b
Fixed #24351 , #24346 -- Changed the signature of allow_migrate().
...
The new signature enables better support for routing RunPython and
RunSQL operations, especially w.r.t. reusable and third-party apps.
This commit also takes advantage of the deprecation cycle for the old
signature to remove the backward incompatibility introduced in #22583 ;
RunPython and RunSQL won't call allow_migrate() when when the router
has the old signature.
Thanks Aymeric Augustin and Tim Graham for helping shape up the patch.
Refs 22583.
2015-02-20 21:34:09 +07:00
Tim Graham
664c038f2c
Moved contrib.contenttypes tests out of contrib.
2015-02-16 17:45:38 -05:00
Sergey Fedoseev
d392c1e150
Refs #24299 -- Made contenttypes migrations signal handler more robust.
2015-02-16 13:36:53 -05:00
Markus Holtermann
4dd1f4c5eb
Explicitly checked for LookupError in contenttypes migration
2015-02-16 17:08:19 +01:00
Loic Bistuer
5efd472178
Reworked docstrings and comments in related.py.
...
Thanks Tim Graham for the review.
2015-02-16 20:40:04 +07:00
Loic Bistuer
c5a77721e2
Merged ManyRelatedObjectsDescriptor and ReverseManyRelatedObjectsDescriptor
...
and made all "many" related objects descriptors inherit from
ForeignRelatedObjectsDescriptor.
2015-02-16 20:40:04 +07:00
Loic Bistuer
18c0aaa912
Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.
...
Thanks Carl Meyer and Tim Graham for the reviews and to all involved
in the discussion.
2015-02-14 02:28:24 +07:00
Markus Holtermann
2832a9b028
Revert "Fixed #24075 -- Prevented running post_migrate signals when unapplying initial migrations of contenttypes and auth"
...
This reverts commit 737d24923a
.
2015-02-07 20:14:49 +01:00
Markus Holtermann
bd3d796ecd
Revert "Refs #24075 -- Silenced needless call_command output while running tests"
...
This reverts commit 51dc617b21
.
2015-02-07 19:22:31 +01:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Loic Bistuer
20eb51ce0d
Fix small regression caused by 71ada3a8e6
.
...
During direct assignment, evaluating the iterable before the transaction
is started avoids leaving the transaction dirty if an exception is raised.
This is slightly more wasteful but probably not enough to warrant a change
of behavior.
Thanks Anssi for the feedback. Refs #6707 .
2015-02-05 16:59:56 +07:00
Loic Bistuer
71ada3a8e6
Fixed #6707 -- Added RelatedManager.set() and made descriptors' __set__ use it.
...
Thanks Anssi Kääriäinen, Carl Meyer, Collin Anderson, and Tim Graham for the reviews.
2015-02-05 12:45:08 +07:00
Loic Bistuer
84b6c76830
Fixed #24210 -- Cleaned up relational fields __init__().
...
Thanks Collin Anderson and Tim Graham for the reviews.
2015-01-27 22:35:49 +07:00
Tim Graham
3b89d2d540
Removed contrib.contenttypes.generic per deprecation timeline; refs #19774 .
2015-01-18 13:11:31 -05:00
Claude Paroz
53e1423eda
Updated en translation catalogs
...
Forward port of 666c12e52
from stable/1.8.x
2015-01-17 11:19:37 +01:00
Claude Paroz
b4ac232907
Fixed #24099 -- Removed contenttype.name deprecated field
...
This finsishes the work started on #16803 .
Thanks Simon Charette, Tim Graham and Collin Anderson for the
reviews.
2015-01-16 20:21:34 +01:00
Markus Holtermann
51dc617b21
Refs #24075 -- Silenced needless call_command output while running tests
...
Thanks Tim Graham for the report
2015-01-15 21:07:39 +01:00
Markus Holtermann
737d24923a
Fixed #24075 -- Prevented running post_migrate signals when unapplying initial migrations of contenttypes and auth
...
Thanks Florian Apolloner for the report and Claude Paroz and Tim Graham for the review and help on the patch.
2015-01-14 19:59:39 +01:00
Simon Charette
f2f70faa80
Removed an undocumented contenttypes synchronization method.
2015-01-09 15:58:52 -05:00
Anssi Kääriäinen
0c7633178f
Fixed #24020 -- Refactored SQL compiler to use expressions
...
Refactored compiler SELECT, GROUP BY and ORDER BY generation.
While there, also refactored select_related() implementation
(get_cached_row() and get_klass_info() are now gone!).
Made get_db_converters() method work on expressions instead of
internal_type. This allows the backend converters to target
specific expressions if need be.
Added query.context, this can be used to set per-query state.
Also changed the signature of database converters. They now accept
context as an argument.
2015-01-08 14:07:54 -05:00
Claude Paroz
d6c8121ed0
Removed unneeded smart_text calls
...
`verbose_name_raw` return value comes from `force_text()` anyway.
2015-01-08 15:27:13 +01:00
Daniel Pyrathon
fb48eb0581
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
...
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Daniel Pyrathon
8958170755
Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions
2015-01-02 10:46:04 -05:00
Anssi Kääriäinen
f233bf47dd
Fixed #21414 -- Removed RelatedObject and deprecated Field.related.
2014-12-23 10:54:25 -05:00
Anssi Kääriäinen
1c5cbf5e5d
Fixed #24002 -- GenericRelation filtering targets related model's pk
...
Previously Publisher.objects.filter(book=val) would target
book.object_id if book is a GenericRelation. This is inconsistent to
filtering over reverse foreign key relations, where the target is the
related model's primary key.
2014-12-17 10:04:52 +02:00
Markus Holtermann
aa5ef0d4fc
Fixed #23822 -- Added support for serializing model managers in migration
...
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
2014-12-15 08:34:15 -05:00
Jon Dufresne
4468c08d70
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
2014-12-08 07:58:23 -05:00
wrwrwr
dd35cc232a
Fixed #23641 -- Moved post_migrate signals for contrib apps to AppConfig.ready().
2014-11-27 13:06:35 -05:00
Josh Smeaton
f59fd15c49
Fixed #14030 -- Allowed annotations to accept all expressions
2014-11-15 14:00:43 +00:00
averybigant
b7a5b6ab86
Fixed #23750 -- Allowed core.checks.register to be used as a function
2014-11-11 16:29:32 +01:00
Berker Peksag
c9178ef17a
Limited lines to 119 characters in django/{contrib,db}.
...
Refs #23395 .
2014-10-29 07:59:35 -04:00
Loic Bistuer
ed37f7e979
Fixed #23611 -- update_or_create failing from a related manager
...
Added update_or_create to RelatedManager, ManyRelatedManager and
GenericRelatedObjectManager.
Added missing get_or_create to GenericRelatedObjectManager.
2014-10-08 03:27:31 +07:00
Tim Graham
32c7d3c061
Fixed #15089 -- Allowed contrib.sites to lookup the current site based on request.get_host().
...
Thanks Claude Paroz, Riccardo Magliocchetti, and Damian Moore
for contributions to the patch.
2014-10-01 16:23:20 -04:00
Claude Paroz
d6a15026c4
Updated translations from Transifex
...
Forward port of e9c8aefbce
from stable/1.7.x
2014-09-30 20:55:50 +02:00
Justin Caratzas
cf43a1ee90
Fixed #23539 -- Added get_extra(), get_max_num(), and get_min_num() hooks to GenericInlineModelAdmin.
2014-09-24 06:32:42 -04:00
Andrew Godwin
7a259008a7
Fixed #22411 : Throw a more helpful error if contenttypes doesn't exist.
2014-09-05 11:59:56 -07:00
Tim Graham
1101467ce0
Limited lines to 119 characters in django/
...
refs #23395 .
2014-09-05 09:22:16 -04:00
Claude Paroz
efa67b897b
Fetched translations from Transifex
...
Forward port of 49280a73ea
from stable/1.7.x
2014-08-20 10:22:41 +02:00
Jacob Haslehurst
f676305ece
Fixed #22982 -- Added GenericRelatedObjectManager.__str__. to prevent crash.
...
Thanks bendavis78 for the report.
Forwardport of 29585e9b6a
from stable/1.7.x
2014-08-07 14:44:20 -04:00
Mitar
1ed6fbcf44
Fixed #21940 -- Added kwargs to contribute_to_class() of model fields..
...
Thanks Kronuz for the suggestion.
2014-08-01 07:41:28 -04:00
Nick Sandford
fa3cf006b2
Fixed #23078 -- Regression in update_contenttypes() interactivity.
...
Thanks raymond at adaptiv.nl for the report.
2014-07-23 08:45:09 -04:00
Tim Graham
eb8600a656
Added database migration for contrib.contenttypes.
...
Moved contenttypes tests to allow them to run correctly in the presence of
migrations. refs #22170 .
2014-06-16 15:03:00 -04:00
Anubhav Joshi
5643a3b51b
Fixed #10811 -- Made assigning unsaved objects to FK, O2O, and GFK raise ValueError.
...
This prevents silent data loss.
Thanks Aymeric Augustin for the initial patch and Loic Bistuer for the review.
2014-06-05 13:12:01 -04:00
Antonis Christofides
62f9508ade
Fixed #20401 -- ContentTypeManager.get_for_model reads from db_for_read.
...
Thanks Simon Charette and Tim Graham for the reviews.
2014-05-29 23:01:55 +07:00
Claude Paroz
1a69d276bd
Updated translation catalogs
2014-05-19 15:17:35 +02:00
Anders Steinlein
4ef10f245a
Fixed #17642 -- Added min_num support to modelformsets, inlines, and the admin.
...
Thanks Stephen Burrows for work on the patch as well.
Forwardport of 2914f66983
from stable/1.7.x
2014-05-15 07:25:35 -04:00
Tim Graham
b513fa5fc6
Fixed #22195 -- Used constants to define built-in tags for check framework.
...
Thanks Elvard for the patch.
2014-04-10 08:45:48 -04:00