Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/db/models/options.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #18012 -- Removed the now unused proxied_children ↵Simon Charette2015-10-121-1/+0
| | | | | | model option. Thanks to Tim for the review.
* Refs #18012 -- Made proxy and concrete model reverse ↵Simon Charette2015-10-121-10/+4
| | | | | | | fields consistent. Prior to this change proxy models reverse fields didn't include the reverse fields pointing to their concrete model.
* Fixed #18012 -- Propagated reverse foreign keys from ↵Simon Charette2015-10-121-3/+10
| | | | | | proxy to concrete models. Thanks to Anssi for the review.
* Refs #12663 -- Removed deprecated Model._meta methods.Tim Graham2015-09-241-156/+3
|
* Fixed #24590 -- Cached calls to swappable_setting.Markus Holtermann2015-08-271-1/+1
| | | | | | | | | | Moved the lookup in Field.swappable_setting to Apps, and added an lru_cache to cache the results. Refs #24743 Thanks Marten Kenbeek for the initial work on the patch. Thanks Aymeric Augustin and Tim Graham for the review.
* Made Options.get_base_chain() always return a list.Valentina Mukhamedzhanova2015-08-141-5/+5
|
* Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham2015-06-241-4/+4
| | | | | Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
* Fixed #24758 -- Corrected Options.get_fields() docstring.Tim Graham2015-05-081-3/+3
|
* Fixed #24693 -- Added label and label_lower property to ↵Luis Del Giudice2015-05-021-2/+9
| | | | Model._meta
* Fixed #23879 -- Allowed model migration skip based on ↵Claude Paroz2015-04-181-1/+21
| | | | | | | feature/vendor Thanks Carl Meyer for the report and review, and Tim Graham for the review.
* Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen2015-03-251-9/+9
| | | | | | | | 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.
* Fixed #24479 -- Added system check to prevent both ↵Jon Dufresne2015-03-211-0/+4
| | | | ordering and order_wrt.
* Removed double pop from meta_attrs.Jon Dufresne2015-03-211-5/+2
|
* Fixed #24328 -- cleaned up Options._get_fields() ↵Anssi Kääriäinen2015-02-201-92/+85
| | | | implementation
* Fixed #24289 -- Reversed usage of Field.many_to_one and ↵Loic Bistuer2015-02-131-3/+3
| | | | | | | one_to_many. Thanks Carl Meyer and Tim Graham for the reviews and to all involved in the discussion.
* Fixed #24146 -- Allowed model._meta.get_field() to be ↵Daniel Pyrathon2015-02-111-1/+1
| | | | used after apps.models_ready
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-3/+5
|
* Fixed #24266 -- Changed get_parent_list to return a list ↵Simon Charette2015-02-031-7/+7
| | | | | | ordered by MRO. Thanks to Aron Podrigal for the initial patch and Tim for the review.
* Reverted "Fixed #24146 -- Fixed a missing fields ↵Tim Graham2015-02-031-20/+8
| | | | | | | | regression in admin checks." This reverts commit e8171daf0cd7f0e070395cb4c850c17fea32f11d. A new solution is forthcoming.
* Fixed #24146 -- Fixed a missing fields regression in ↵Collin Anderson2015-01-161-8/+20
| | | | | | | | admin checks. This allows using get_field() early in the app loading process. Thanks to PirosB3 and Tim Graham.
* Fixed incorrect error message in Options.get_fields()Collin Anderson2015-01-141-2/+2
|
* Simplified verbose_name_raw propertyClaude Paroz2015-01-081-6/+3
|
* Fixed #12663 -- Formalized the Model._meta API for ↵Daniel Pyrathon2015-01-071-251/+481
| | | | | | | retrieving fields. Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
* Fixed #9104 -- Moved FieldDoesNotExist to core.exceptionsDaniel Pyrathon2015-01-021-1/+2
|
* Fixed #21414 -- Removed RelatedObject and deprecated ↵Anssi Kääriäinen2014-12-231-6/+6
| | | | Field.related.
* Changed internal storing of abstract and concrete ↵Markus Holtermann2014-12-151-3/+18
| | | | | | | managers to be in a single list. This commit prepares the internal manager layout to be serialized by migrations; refs #23822.
* Fixed #22994 -- regression with generic FK + admin list_viewAnssi Kääriäinen2014-07-141-1/+3
| | | | | | | | | | | | The reason for the regression was that the GenericForeignKey field isn't something meta.get_field_by_name() should return. The reason is that a couple of places in Django expects get_field_by_name() to work this way. It could make sense to return GFKs from get_field_by_name(), but that should likely be done as part of meta refactoring or virtual fields refactoring patches. Thanks to glicerinu@gmail.com for the report and to Tim for working on the issue.
* Fixed #22778 -- Added a model Meta option to define ↵Renaud Parent2014-06-181-1/+3
| | | | | | default_related_name. Thanks jorgecarleitao and mmardini for reviews.
* Fixed several typos in DjangoAlex Gaynor2014-05-291-1/+1
|
* Fixed #22720 -- Migrations attempt to create _order twice.Víðir Valberg Guðmundsson2014-05-291-1/+2
|
* Removed Model._meta.module_name per deprecation timeline.Tim Graham2014-03-211-12/+0
| | | | refs #19689.
* Removed Model._meta.get_(add|change|delete)_permission ↵Tim Graham2014-03-211-33/+0
| | | | methods per deprecation timeline.
* Fixed #21188 -- Introduced subclasses for ↵Claude Paroz2014-03-081-5/+6
| | | | | | | to-be-removed-in-django-XX warnings Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
* Fixed #22207 -- Added support for GenericRelation ↵Gabe Jackson2014-03-051-5/+4
| | | | | | | | | | | reverse lookups GenericRelation now supports an optional related_query_name argument. Setting related_query_name adds a relation from the related object back to the content type for filtering, ordering and other query operations. Thanks to Loic Bistuer for spotting a couple of important issues in his review.
* Fixed #22172 -- Allowed index_together to be a single ↵Anubhav Joshi2014-03-011-9/+14
| | | | | | list (rather than list of lists).. Thanks EmilStenstrom for the suggestion.
* Fixed #16905 -- Added extensible checks (nee validation) ↵Russell Keith-Magee2014-01-201-7/+12
| | | | | | | | | | | framework This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.
* Small style cleanup.Aymeric Augustin2013-12-311-4/+8
|
* Removed the only_installed argument of Apps.get_models.Aymeric Augustin2013-12-281-2/+2
| | | | Refs #15903, #15866, #15850.
* Turned apps.ready into a property. Added tests.Aymeric Augustin2013-12-261-2/+2
|
* Removed a few gratuitous lambdas.Aymeric Augustin2013-12-261-5/+3
|
* Renamed AppCache to Apps.Aymeric Augustin2013-12-241-9/+9
| | | | | | Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Terminated AppCache._populate() with extreme prejudice.Aymeric Augustin2013-12-221-1/+1
| | | | | | | | | | It was called _populate() before I renamed it to populate(). Since it has been superseded by populate_models() there's no reason to keep it. Removed the can_postpone argument of load_app() as it was only used by populate(). It's a private API and there's no replacement. Simplified load_app() accordingly. Then new version behaves exactly like the old one even though it's much shorter.
* Removed the app_config.installed flag.Aymeric Augustin2013-12-221-2/+2
| | | | | | | | | Since applications that aren't installed no longer have an application configuration, it is now always True in practice. Provided an abstraction to temporarily add or remove applications as several tests messed with app_config.installed to achieve this effect. For now this API is _-prefixed because it looks dangerous.
* Normalized Model._meta.installed.Aymeric Augustin2013-12-171-1/+9
| | | | | | | | Used the information from the app cache instead of creating a duplicate based on INSTALLED_APPS. Model._meta.installed is no longer writable. It was a rather sketchy way to alter private internals anyway.
* Moved the new app cache inside core.Aymeric Augustin2013-12-171-1/+1
|
* Removed module-level functions for the app cache.Aymeric Augustin2013-12-171-4/+4
| | | | | | | | | | | | | | | Since the original ones in django.db.models.loading were kept only for backwards compatibility, there's no need to recreate them. However, many internals of Django still relied on them. They were also imported in django.db.models. They never appear in the documentation, except a quick mention of get_models and get_app in the 1.2 release notes to document an edge case in GIS. I don't think that makes them a public API. This commit doesn't change the overall amount of global state but clarifies that it's tied to the app_cache object instead of hiding it behind half a dozen functions.
* Moved django.db.models.loading to django.apps.cache.Aymeric Augustin2013-12-171-1/+1
| | | | This commit doesn't contain any code changes; it's purely a refactoring.
* Fixed ModelState breaking when unique_together has ↵Baptiste Mispelon2013-12-061-3/+6
| | | | unhashable elements.
* Fixed #21469 -- Allow set objects in Meta.unique_together.Baptiste Mispelon2013-11-201-0/+1
| | | | Thanks to Tim for the review.