Commit a3e7ca1
Use model meta to generate verbose name (#54)
Render field names of object rather than the word "None"
This is fix for issue #53, since an object may not exist when rendering
`templates/admin/change_data.html` - ie, if we're greating a new object
when `confirm_add = True` is set on a `ModelAdmin` with
the `AdminConfirmMixin`.
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.
Co-authored-by: T Pham <thuutrangpham@gmail.com>1 parent e86e394 commit a3e7ca1
2 files changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
432 | | - | |
| 431 | + | |
| 432 | + | |
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
0 commit comments