#33619: Proxy model does not inherite indexes and constraints from base model
-------------------------------------+-------------------------------------
               Reporter:  xcoderl    |          Owner:  nobody
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:             |        Version:  3.2
  contrib.admin                      |       Keywords:  multiple model
               Severity:  Normal     |  admin
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Hi,

 I am trying to enable multiple model admins for one model. Here is the
 scenario:

 1) I have a model called A that has "abstract = true";
 2) I have a model called B that inherits model A, which has all the
 fields, constraints, indexes, etc. under Meta;
 3) I have a model admin for model B and everything works as expected.
 4) Now, I want to create another model admin for model B. The solution is
 to utilize a proxy model C to B as suggested at the following link,
 https://stackoverflow.com/questions/2223375/multiple-modeladmins-views-
 for-same-model-in-django-admin

 The problem is that the proxy model C does not inherit constraints,
 indexes from model B. And my app has some extra logic to check index and
 constraint definition, the absence of which caused some problems
 apparently.

 It is intended behavior of proxy model? If it is, is there any other way
 to create multiple admins for one model?

 Thanks very much,
 Jaska

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33619>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017ffd82fb70-e443cdf3-0728-4e20-80f0-7938c4893550-000000%40eu-central-1.amazonses.com.

Reply via email to