[Django] #21682: Move relevant fields from Model._meta to Model._meta.app_config

18 views
Skip to first unread message

Django

unread,
Dec 26, 2013, 3:54:03 PM12/26/13
to django-...@googlegroups.com
#21682: Move relevant fields from Model._meta to Model._meta.app_config
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New | Status: new
feature | Version: master
Component: Database | Keywords: app-loading
layer (models, ORM) | Has patch: 0
Severity: Normal | Needs tests: 0
Triage Stage: | Easy pickings: 0
Unreviewed |
Needs documentation: 0 |
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
This is a very general idea for which I don't have a clear proposal yet.

--
Ticket URL: <https://code.djangoproject.com/ticket/21682>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 28, 2013, 10:22:49 AM12/28/13
to django-...@googlegroups.com
#21682: Move relevant fields from Model._meta to Model._meta.app_config
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: app-loading | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by mitar):

* cc: mmitar@… (added)


Comment:

Could here be also added that you do not want a model to be registered?

--
Ticket URL: <https://code.djangoproject.com/ticket/21682#comment:2>

Django

unread,
Dec 28, 2013, 11:13:00 AM12/28/13
to django-...@googlegroups.com
#21682: Move relevant fields from Model._meta to Model._meta.app_config
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: app-loading | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by aaugustin):

Well... What's the use case?

The fact that models are registered is a private implementation detail
that isn't described anywhere in the documentation.

--
Ticket URL: <https://code.djangoproject.com/ticket/21682#comment:3>

Django

unread,
Jan 1, 2014, 3:07:42 PM1/1/14
to django-...@googlegroups.com
#21682: Use app_config as a reference instead of app_label in Options (Model._meta)

-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: app-loading | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by aaugustin):

In fact, the real question this ticket asks is -- should the Options class
take an app_config in argument rather than an app_label?

I'm changing the title accordingly.

We aren't guaranteed to have an app_config available as long as:

- models can live outside of installed applications (#21680)
- applications / application configurations can import models (#21719)

I'm not sure we'll make drastic choices on these two tickets.

This ticket is likely to end up as wontfix, but it's probably worth
keeping until the dust of app-loading settles (after the 1.7 release).

--
Ticket URL: <https://code.djangoproject.com/ticket/21682#comment:4>

Django

unread,
Jan 10, 2014, 5:44:45 PM1/10/14
to django-...@googlegroups.com
#21682: Use app_config as a reference instead of app_label in Options (Model._meta)
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: app-loading 1.9 | Needs documentation: 0

Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* keywords: app-loading => app-loading 1.9


Comment:

This ticket cannot move forward until Django 1.9.

--
Ticket URL: <https://code.djangoproject.com/ticket/21682#comment:5>

Django

unread,
Mar 16, 2014, 8:04:04 PM3/16/14
to django-...@googlegroups.com
#21682: Use app_config as a reference instead of app_label in Options (Model._meta)
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: app-loading 1.9 | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by pirosb3):

* cc: pirosb3 (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/21682#comment:6>

Django

unread,
Feb 10, 2015, 4:18:17 PM2/10/15
to django-...@googlegroups.com
#21682: Use app_config as a reference instead of app_label in Options (Model._meta)
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: app-loading 1.9 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

I took a stab at this, unfortunately, it doesn't play well with the fake
"migrations" app label declared by the Migration model.

--
Ticket URL: <https://code.djangoproject.com/ticket/21682#comment:7>

Django

unread,
Aug 19, 2015, 7:14:34 PM8/19/15
to django-...@googlegroups.com
#21682: Use app_config as a reference instead of app_label in Options (Model._meta)
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: app-loading | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* keywords: app-loading 1.9 => app-loading


--
Ticket URL: <https://code.djangoproject.com/ticket/21682#comment:8>

Django

unread,
Dec 5, 2018, 8:54:19 AM12/5/18
to django-...@googlegroups.com
#21682: Use app_config as a reference instead of app_label in Options (Model._meta)
-------------------------------------+-------------------------------------
Reporter: Aymeric Augustin | Owner: nobody

Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: app-loading | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by spiringwriter):

* Attachment "Engineering.pdf" added.

Django

unread,
Aug 22, 2022, 10:50:19 PM8/22/22
to django-...@googlegroups.com
#21682: Use app_config as a reference instead of app_label in Options (Model._meta)
-------------------------------------+-------------------------------------
Reporter: Aymeric Augustin | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: wontfix

Keywords: app-loading | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* status: new => closed
* resolution: => wontfix


Comment:

Finally going to resolve this ticket as ''wontfix''. As pointed out by
Aymeric there are complications wrt/ to migration fake models and quite
frankly it's not clear to me what benefits it would provide over the rare
cases where `self.apps(self.app_label)` is used.

--
Ticket URL: <https://code.djangoproject.com/ticket/21682#comment:9>

Reply all
Reply to author
Forward
0 new messages