Commit Graph

316 Commits

Author SHA1 Message Date
Claude Paroz c651331b34 Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
Anton Samarchyan 5411821e3b Refs #27656 -- Updated django.contrib docstring verb style according to PEP 257. 2017-02-04 16:39:28 -05:00
Tim Graham 29f607927f Fixed spelling of "nonexistent". 2017-02-03 08:01:45 -05:00
Vytis Banaitis 8838d4dd49 Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. 2017-02-01 11:41:56 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Claude Paroz 2b281cc35e Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz f3c43ad1fd Refs #23919 -- Removed python_2_unicode_compatible decorator usage 2017-01-18 13:44:34 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Simon Charette 4e48cfc108 Fixed #27709 -- Fixed get_for_models() for proxies with an empty cache.
Thanks Peter Inglesby for the report and tests.
2017-01-13 10:02:01 -05:00
Claude Paroz 63bf615d5e Updated translations from Transifex
Forward port of bfc9c72725 from stable/1.10.x.
2016-09-30 22:12:41 +02:00
Tim Graham 6a2af01452 Fixed #24865 -- Added remove_stale_contenttypes management command.
Thanks Simon Charette for the review.
2016-09-06 09:48:58 -04:00
Claude Paroz 2ced2f785d Replaced smart_* by force_* calls whenever possible
The smart_* version should only be used when a lazy string should keep
its lazy status.
2016-09-03 13:46:41 +02:00
Tim Graham e2dfa81ff7 Refs #18682 -- Edited explanation in stale content type deletion.
Follow up to 8db889eaf7.
2016-08-10 21:19:09 -04:00
Claude Paroz 374b6091ac Pulled contrib translations from Transifex
Forward port f19cadd391 from stable/1.10.x
2016-08-01 19:47:19 +02:00
Erik Romijn 8db889eaf7 Fixed #18682 -- Expanded explanation in stale content type deletion. (#6869) 2016-07-03 15:55:14 +02:00
Claude Paroz 490107f14d Added Upper/Lower Sorbian translations 2016-06-29 21:11:30 +02:00
Alex Hill 2ff7ef15b0 Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks and tests 2016-05-19 21:33:36 -04:00
Simon Charette f179113e6c
Fixed #24067 -- Renamed content types upon model renaming.
Thanks to Tim for the extensive review.
2016-05-17 12:14:58 -04:00
Simon Charette 61a16e0270 Fixed #24075 -- Used post-migration models in contrib apps receivers.
Thanks Markus and Tim for the review.
2016-05-15 19:51:16 -04:00
Michal Petrucha b9f8635f58 Refs #16508 -- Added invalidation of stale cached instances of GenericForeignKey targets. 2016-05-03 09:29:05 -04:00
Michal Petrucha 8a47ba679d Refs #16508 -- Made Model.__init__() aware of virtual fields.
It's no longer necessary for GenericForeignKey (and any other virtual fields)
to intercept the field's values using the pre_init signal.
2016-05-03 09:06:26 -04:00
Claude Paroz 8dcf352c03 Pulled translations from Transifex 2016-04-30 14:27:07 +02:00
Claude Paroz d9a00ad16b Removed deprecated Chinese language codes for contrib apps
Refs #18149.
2016-04-30 14:26:47 +02:00
Anssi Kääriäinen 7f51876f99 Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading. 2016-04-29 13:06:32 -04:00
Tim Graham 901dc90db0 Removed unused/untested Field.get_choices_default()/value_to_string() methods. 2016-04-25 08:05:27 -04:00
Michal Petrucha cb65e62c84 Fixed typo in GenericRelatedObjectManager.add() error message. 2016-04-20 10:06:49 -04:00
dani poni d29d11b026 Fixed #26085 -- Fixed contenttypes shortcut() view crash with a null fk to Site.
Thanks Fabien Schwob for the initial patch.
2016-04-16 17:27:44 -04:00
Michal Petrucha c339a5a6f7 Refs #16508 -- Renamed the current "virtual" fields to "private".
The only reason why GenericForeignKey and GenericRelation are stored
separately inside _meta is that they need to be cloned for every model
subclass, but that's not true for any other virtual field. Actually,
it's only true for GenericRelation.
2016-04-13 10:10:53 -04:00
Tim Graham df8d8d4292 Fixed E128 flake8 warnings in django/. 2016-04-08 09:51:06 -04:00
Simon Charette c92123cc1d Fixed #26226 -- Made related managers honor the queryset used for prefetching their results.
Thanks Loïc for the suggested improvements and Tim for the review.
2016-03-02 16:10:18 -05:00
Simon Charette 3938b3ccaa Fixed #26286 -- Prevented content type managers from sharing their cache.
This should prevent managers methods from returning content type instances
registered to foreign apps now that these managers are also attached to models
created during migration phases.

Thanks Tim for the review.

Refs #23822.
2016-02-26 16:18:16 -05:00
Tim Graham 004ba0f99e Removed unneeded hint=None/obj=None in system check messages. 2016-02-12 13:01:25 -05:00
Simon Charette a08fda2111 Fixed #25746 -- Isolated inlined test models registration.
Thanks to Tim for the review.
2016-01-06 20:00:07 -05:00
Claude Paroz f14ab700c3 Updated translations from Transifex
Forward port of 59f3590ca7 from stable/1.9.x.
2015-12-31 15:53:02 +01:00
Anssi Kääriäinen cd0ba8053d Fixed #12885 -- Fixed queries with GenericRelations to multi-table inheritance child models. 2015-12-14 10:48:01 -05:00
Claude Paroz 273ce8aa6a Pulled contrib translations from Transifex
Forward port of 6a4649c27e from stable/1.9.x
2015-12-01 20:37:57 +01:00
Tim Graham 0b5d32faca Fixed #25611 -- Standardized descriptor signatures. 2015-10-26 11:31:16 -04:00
Tim Graham 37a5a36321 Refs #13637 -- Removed unused code in GenericRelatedObjectManager
Appears unused since 585b7acaa3.
2015-10-02 10:32:46 -04:00
Tim Graham 75374d3797 Refs #24099 -- Removed compatibility shim for ContentType.name field. 2015-09-23 19:31:10 -04:00
Aymeric Augustin e542e81b39 Renamed descriptor classes for related objects.
The old names were downright confusing. Some seemed to mean the opposite
of what the class actually did.

The new names follow a consistent nomenclature:

    (Forward|Reverse)(ManyToOne|OneToOne|ManyToMany)Descriptor.

I mentioned combinations that do not exist in the docstring in order to
help people who would search for them in the code base.
2015-09-21 22:20:42 +02:00
Malcolm Box 1d8eb0cae5 Fixed #25374 -- Made ModelAdmin checks work on instances instead of classes.
This allows dynamically-generated attributes to be specified in
checked ModelAdmin attributes without triggering errors.
2015-09-11 09:28:34 -04:00
Alex Hill 7bec480fe2 Fixed #24201 -- Added order_with_respect_to support to GenericForeignKey. 2015-08-27 09:20:17 -04:00
Tim Graham 5980b05c1f Fixed #25160 -- Moved unsaved model instance data loss check to Model.save()
This mostly reverts 5643a3b51b and
81e1a35c36.

Thanks Carl Meyer for review.
2015-08-10 08:51:32 -04:00
Tim Graham adc0c4fbac Fixed #18556 -- Allowed RelatedManager.add() to execute 1 query where possible.
Thanks Loic Bistuer for review.
2015-07-28 09:28:25 +07:00
Flavio Curella c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Tim Graham aaacaeb096 Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04:00
Claude Paroz 6aed5cfc6f Updated translations from Transifex
Updates for languages: Indonesian, Belarusian, Persian, and Dutch.
Forward port of cb370f8510 from stable/1.8.x
2015-04-30 14:29:08 +02:00
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