-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Add support for admin inlines #315
Add support for admin inlines #315
Conversation
Codecov Report
@@ Coverage Diff @@
## master #315 +/- ##
==========================================
+ Coverage 97.62% 97.72% +0.09%
==========================================
Files 15 15
Lines 590 615 +25
Branches 72 77 +5
==========================================
+ Hits 576 601 +25
Misses 7 7
Partials 7 7
Continue to review full report at Codecov.
|
@mathieuhentges Do you mind attaching screenshots to show what this looks like after the changes? Thanks. Also please fix merge conflicts. |
@mathieuhentges Any updates? Or would you like me to take this over? |
Closing this since I haven't heard from @mathieuhentges |
@rossmechanic were you able to take this over? I think this could be quite useful! |
@merwok Haven't been able to get around to it yet. I wanted to make it easy to run a sample app within the repo (so it would be easy to test admin features). Once I get that done, it'll be really easy to knock out a bunch of the bugs/features we want on the admin side. Feel free to work on this if you'd like though. I'd be happy to accept a PR |
I’ll poke my co-worker Mathieu or see if I find the time myself! I opened a ticket so that this doesn’t get forgotten. |
This PR does work to allow inlines to be displayed in the history detail, however it is always the current state of the related models, not the state they were in when saving. In many cases, this is not a true representation of the state of this snapshot as you would have saved it in the admin. Is there currently a branch working to address this? |
Nothing working to currently address this @nickvellios, but I'd be happy to discuss a possible solution |
This is something I quickly hacked together based off of this PR just to see how close I could get to a solution. It is far from ideal because there is no way to be sure the 5 second fuzzy history_date filter will be accurate. For example, if something hangs between saving the models, or if multiple saves take place within a 5 second period (multiple users or API). It also doesn't respect deletes and additions if the number of related objects in the inline formset has changed. I'm struggling to find a way to accurately represent the historical state of related objects with how the historical models are currently structured.
|
The inlines couldn't be displayed in the admin form view.
I added the 'inline_admin_formsets' entry in context to make them available.