Open dtcooper opened 7 months ago
Thanks for your contribution!
Do tests already exist for this? If not could you add a test case that would have failed before but now passes?
Ended up not using the project since it blew up for DecimalFields - so provided as-is! :)
Edit: my DecimalField blow up was my own fault. 😝
I'll look into adding tests.
Thanks. Let me know if you need support with either the tests or debugging your decimal issue.
If you found the reason you had issues with decimals, can you share that? I'll be able to help others if they face a similar issue if I know what happened.
Hi @TrangPham - I ended up not using django-admin-confirm for my project, so I'm not sure I'll have time ot prepare test cases. Thanks!
Render field names of object rather than the word "None"
This is fix for issue https://github.com/TrangPham/django-admin-confirm/issues/53, since an object may not exist when rendering
templates/admin/change_data.html
- ie, if we're greating a new object whenconfirm_add = True
is set on aModelAdmin
with theAdminConfirmMixin
.Also makes sure we send an actual object (not the string "None") to the base template, to remove other instances of the word "None" from the add view.
Uses capitalize on the string, as that seems to be the pattern in Django admin.
Fixes
Tested via: