#21338: Can't use the same class name for proxy models
-------------------------------------+-------------------------------------
Reporter: srenskiy@… | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.4
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: model | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by shai):
This ticket asks that proxy models will be able to exist in the same app,
and with the same name, as non-proxy models. This doesn't make sense to me
-- if it is valid, then why only for proxy models?
Was the intention only to allow it if the same-named model is actually the
proxied model? As far as I can see, if your app has concrete models x.A
and x.B, the patch allows you to add another model y.A that proxies x.B
(invalidating the note in the PR that for model creation, it doesn't
matter if you pick the proxy or the concrete model).
Many parts in Django assume there's only one model with a given name in an
app. Changing that is quite major, and I really don't see the use-case. It
seems much more sensible, either to give the proxy a different name, or
put it in a different app.
Can you explain the need?
--
Ticket URL: <https://code.djangoproject.com/ticket/21338#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/076.7d01d7a2730a821215dc75b5a4317129%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.