Re: [Django] #11078: Proxy models do not inherit META.app_label

23 views
Skip to first unread message

Django

unread,
Aug 31, 2014, 4:25:00 PM8/31/14
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: proxy model | Needs documentation: 0
app_label | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by aaugustin):

This still happens after the app-loading refactor.

I couldn't locate the code that copies the original model's meta
attributes to the proxy's meta. It looks like it could be
`Options.setup_proxy` but that method only deals with a few attributes.

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

Django

unread,
Apr 19, 2015, 11:23:57 AM4/19/15
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by marco-santamaria):

Only the 'ordering' and 'get_latest_by' meta attributes get copied in the
__new__ method of ModelBase.

Therefore, if a meta attribute is not in ['ordering', 'get_latest_by'], it
will not be inherited by the Meta class in the proxy model.

A pull request that removes that statement from the documentation has been
proposed. See https://github.com/django/django/pull/4531

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

Django

unread,
Apr 19, 2015, 11:28:59 AM4/19/15
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by marco-santamaria):

* has_patch: 0 => 1
* type: Bug => Cleanup/optimization


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

Django

unread,
Apr 19, 2015, 11:29:57 AM4/19/15
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Florian Apolloner <apollo13@…>):

In [changeset:"cc493d3c061e876d56152c9e951effb9f330fcfe" cc493d3c]:
{{{
#!CommitTicketReference repository=""
revision="cc493d3c061e876d56152c9e951effb9f330fcfe"
Merge pull request #4531 from marco-santamaria/ticket11078

Fixed #11078 -- documentation update.
}}}

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

Django

unread,
Apr 19, 2015, 11:29:57 AM4/19/15
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Marco Santamaria <marco.santamaria@…>):

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


Comment:

In [changeset:"bae72bdd2aa93472617ed28fc3d5a01f0920ea6e" bae72bd]:
{{{
#!CommitTicketReference repository=""
revision="bae72bdd2aa93472617ed28fc3d5a01f0920ea6e"


Fixed #11078 -- documentation update.
}}}

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

Django

unread,
Apr 20, 2015, 9:19:07 AM4/20/15
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"1e0bf2cab9d8f52ddf564da8851bb1082b0120d1" 1e0bf2c]:
{{{
#!CommitTicketReference repository=""
revision="1e0bf2cab9d8f52ddf564da8851bb1082b0120d1"
[1.8.x] Fixed #11078 -- Removed inaccurate docs about proxy models Meta.

Backport of bae72bdd2aa93472617ed28fc3d5a01f0920ea6e from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/11078#comment:10>

Django

unread,
Apr 20, 2015, 9:19:37 AM4/20/15
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"276f760eaa0554d3ea5219e64d23767bc9a2fcdb" 276f760]:
{{{
#!CommitTicketReference repository=""
revision="276f760eaa0554d3ea5219e64d23767bc9a2fcdb"
[1.7.x] Fixed #11078 -- Removed inaccurate docs about proxy models Meta.

Backport of bae72bdd2aa93472617ed28fc3d5a01f0920ea6e from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/11078#comment:11>

Django

unread,
Apr 21, 2015, 3:52:55 AM4/21/15
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by tyrion):

I don't think we fixed this correctly. The doc was indeed wrong about
inheriting "**any** Meta options", but the 'ordering' and 'get_latest_by'
meta attributes are still copied to the new model.

This is why I think this behaviour should be either documented or removed.

--
Ticket URL: <https://code.djangoproject.com/ticket/11078#comment:12>

Django

unread,
Apr 21, 2015, 6:42:56 AM4/21/15
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: gsong | Owner: nobody
Type: | Status: new

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 0 | Needs documentation: 0

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

* status: closed => new
* has_patch: 1 => 0
* resolution: fixed =>


Comment:

Agreed.

--
Ticket URL: <https://code.djangoproject.com/ticket/11078#comment:13>

Django

unread,
Sep 27, 2016, 7:09:20 AM9/27/16
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: George Song | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jonatas CD):

So, I'd say that, for now, it's better to document the current behavior
and then set to discussion if it's still the expected behavior or not.
Based on that eventually open or not a new ticket to change that. Correct?

--
Ticket URL: <https://code.djangoproject.com/ticket/11078#comment:14>

Django

unread,
Sep 27, 2016, 10:49:46 AM9/27/16
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: George Song | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

Sure.

--
Ticket URL: <https://code.djangoproject.com/ticket/11078#comment:15>

Django

unread,
Sep 28, 2016, 12:20:40 PM9/28/16
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: George Song | Owner: Jonatas
Type: | CD
Cleanup/optimization | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jonatas CD):

* owner: nobody => Jonatas CD
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/11078#comment:16>

Django

unread,
Sep 28, 2016, 12:31:39 PM9/28/16
to django-...@googlegroups.com
#11078: Proxy models do not inherit META.app_label
-------------------------------------+-------------------------------------
Reporter: George Song | Owner: Jonatas
Type: | CD
Cleanup/optimization | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: proxy model | Triage Stage: Accepted
app_label |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jonatas CD):

* has_patch: 0 => 1


Comment:

Fixed with https://github.com/django/django/pull/7310

--
Ticket URL: <https://code.djangoproject.com/ticket/11078#comment:17>

Reply all
Reply to author
Forward
0 new messages