-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for generic inlines #7
Comments
Has anyone been able to find a good workaround for this issue? |
Not me, unfortunately... |
I have not tried out a generic nested inline, however I do use a generic inline with a NestedModelAdmin at the moment. I kept getting an error, but the solution was very simple. All I needed to do was add inlines = [] to the generic admin inline. So the following will only work with a generic inline that is an end point (does not have inlines of it's own)! So this is not a true generic nested inline, but I'm able to help someone. Say you have a model:
So A is our root object. A has B as children which has C as children. For this argument D has only A as a foreign relation. Admin.py:
Possible all that is needed to get nested inlines to work with generic keys is adding: |
@BertrandBordage hey man, i just re-ran into this problem. I found a solution a while back: http://stackoverflow.com/questions/23909800/django-nested-inlines-not-shown-in-admin-site/23913043?noredirect=1#comment47190496_23913043 |
@brmc Hi! Thanks for sharing. Nice coincidence, I’m currently working on my own complete rewrite of inlines to handle limitless nested inlines: https://github.com/BertrandBordage/django-super-inlines. I got a first awesome result 5 minutes ago :) I also found a bunch of bugs in the inlines. It was so poorly coded… |
Currently, mixing Nested(Stacked|Tabular)Admin with Generic(Stacked|Tabular)Admin is not working.
IMO, this is a critical feature.
The text was updated successfully, but these errors were encountered: