summaryrefslogtreecommitdiff
path: root/django/db/models/options.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed #24607 -- Serialized natural keys in multi-table inheritance models.João Sampaio2016-10-121-1/+6
|
* Made FieldError/FieldDoesNotExist messages uniform across Python versions.François Freitag2016-09-171-3/+3
| | | Removed possible u'' prefixes on Python 2.
* Removed unneeded smart_textClaude Paroz2016-08-251-4/+2
|
* Fixed #27067 -- Deprecated string_concat() in favor of format_lazy().Mattias Loverot2016-08-251-4/+4
|
* Fixed #27073 -- Removed duplicated managers in `Model._meta.managers`.Loïc Bistuer2016-08-191-1/+6
|
* Fixed #26808 -- Added Meta.indexes for class-based indexes.Akshesh2016-08-051-0/+1
| | | | | | | | * Added the index name to its deconstruction. * Added indexes to sqlite3.schema._remake_table() so that indexes aren't dropped when _remake_table() is called. Thanks timgraham & MarkusH for review and advice.
* Fixed #26709 -- Added class-based indexes.Akshesh2016-06-271-1/+1
| | | | | | Added the AddIndex and RemoveIndex operations to use them in migrations. Thanks markush, mjtamlyn, timgraham, and charettes for review and advice.
* Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify ↵Loïc Bistuer2016-05-171-4/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | models' default and base managers. This deprecates use_for_related_fields. Old API: class CustomManager(models.Model): use_for_related_fields = True class Model(models.Model): custom_manager = CustomManager() New API: class Model(models.Model): custom_manager = CustomManager() class Meta: base_manager_name = 'custom_manager' Refs #20932, #25897. Thanks Carl Meyer for the guidance throughout this work. Thanks Tim Graham for writing the docs.
* Fixed #20932, #25897 -- Streamlined manager inheritance.Loïc Bistuer2016-05-171-21/+27
|
* Fixed #26320 -- Deprecated implicit OneToOnField parent_link.Tim Graham2016-04-221-0/+5
|
* Refs #16508 -- Renamed the current "virtual" fields to "private".Michal Petrucha2016-04-131-8/+28
| | | | | | | 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.
* Fixed E128 flake8 warnings in django/.Tim Graham2016-04-081-15/+12
|
* Fixed W503 flake8 warnings.Tim Graham2016-04-041-3/+3
|
* Fixed #26125 -- Fixed E731 flake warnings.userimack2016-01-251-5/+11
|
* Refs #25746 -- Added a test utility to isolate inlined model registration.Simon Charette2016-01-061-1/+3
| | | | Thanks to Tim for the review.
* Fixed #25750 -- Made Options._expire_cache() fasterPatryk Zawadzki2015-11-141-13/+9
| | | | | | | Avoided unnecessary list operations and delattr() calls that result in an exception being raised as it causes call frame reconstruction which is very costly, especially so in a function that is called millions of times.
* Refs #18012 -- Removed the now unused proxied_children model option.Simon Charette2015-10-121-1/+0
| | | | Thanks to Tim for the review.
* Refs #18012 -- Made proxy and concrete model reverse fields consistent.Simon Charette2015-10-121-10/+4
| | | | | 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 proxy to concrete models.Simon Charette2015-10-121-3/+10
| | | | Thanks to Anssi for the review.
* Refs #12663 -- Removed deprecated Model._meta methods.Tim Graham2015-09-231-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 Model._metaLuis Del Giudice2015-05-021-2/+9
|
* Fixed #23879 -- Allowed model migration skip based on feature/vendorClaude Paroz2015-04-181-1/+21
| | | | | 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 ordering and order_wrt.Jon Dufresne2015-03-211-0/+4
|
* Removed double pop from meta_attrs.Jon Dufresne2015-03-211-5/+2
|
* Fixed #24328 -- cleaned up Options._get_fields() implementationAnssi Kääriäinen2015-02-201-92/+85
|
* Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.Loic Bistuer2015-02-141-3/+3
| | | | | 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 used after ↵Daniel Pyrathon2015-02-101-1/+1
| | | | 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 ordered by MRO.Simon Charette2015-02-031-7/+7
| | | | Thanks to Aron Podrigal for the initial patch and Tim for the review.
* Reverted "Fixed #24146 -- Fixed a missing fields regression in admin checks."Tim Graham2015-02-031-20/+8
| | | | | | This reverts commit e8171daf0cd7f0e070395cb4c850c17fea32f11d. A new solution is forthcoming.
* Fixed #24146 -- Fixed a missing fields regression in admin checks.Collin Anderson2015-01-161-8/+20
| | | | | | 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 retrieving fields.Daniel Pyrathon2015-01-061-251/+481
| | | | | 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 Field.related.Anssi Kääriäinen2014-12-231-6/+6
|
* Changed internal storing of abstract and concrete managers to be in a single ↵Markus Holtermann2014-12-151-3/+18
| | | | | | | 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 default_related_name.Renaud Parent2014-06-181-1/+3
| | | | Thanks jorgecarleitao and mmardini for reviews.
* Fixed several typos in DjangoAlex Gaynor2014-05-281-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 methods per ↵Tim Graham2014-03-211-33/+0
| | | | deprecation timeline.
* Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz2014-03-081-5/+6
| | | | | Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
* Fixed #22207 -- Added support for GenericRelation reverse lookupsGabe Jackson2014-03-051-5/+4
| | | | | | | | | 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.