Closed TrangPham closed 3 years ago
Previously in 0.2.3.dev6
relied mostly on the cache and handled m2m fields as a special case.
Now in 0.2.3.dev7
relying mostly on the post data and using cache to treat files and images as special cases.
Also added handy dandy tests readme to outline all the mutations that should be covered in test cases.
🤞 That this works better because .dev6
introduced more issues than it fixed.
0.2.3.dev9
is on testpypi. See: https://github.com/TrangPham/django-admin-confirm/issues/8#issuecomment-785305831 For more details of differences between dev7 and dev9
So this took a very long time to get to. Here's the previous history #16. This is related to #8
That worked nicely for ManyToManyField but not for the ImageField or FileField.
This MR tries caching (which works for FileField and ImageField, but not ManyToManyField).... thus a combined solution is used. Cache is used primarily, but for any m2m/generic relation fields data it looked up from request.POST (sent via hidden embedded form) and saved the related models.
Note: Had to bypass
_save_related
andsave_m2m
but calls the underlaying functionsTests have been added for ManyToMany, File, and Image fields and caching