Use ModelAdmin.opts for correct reverse in admin#332
Use ModelAdmin.opts for correct reverse in admin#332frennkie wants to merge 1 commit intojazzband:masterfrom
Conversation
10c3a25 to
637dddb
Compare
|
Hi @frennkie, Thanks for the contrib! I'm sure this is useful and the code seems ready to merge as it is. However, as I am not currently aware of this pattern, I would assume there are a fair amount of fellow developers who aren't. Could I ask you to provide some reference, either here (so I'll add it to the commit msg) or as a comment to the code, of either the relevant section in the Django doc's, or perhaps another place where this is documented? If not, would it be possible to add a ~ one sentence rationale explaining the behaviour in addition to the objective (which you already did)? This is all just to facilitate future contribution, as well as the overall didactic quality of the code. |
7132e99 to
338404b
Compare
Make sure to use ModelAdmin.opts in admin.py in order to get the correct app_label and model_name. This is important when a subclass (e.g. of Newsletter) is used
338404b to
dc35e54
Compare
|
I removed one commit that was actually not directly related and two changes that might be (a bit) disputable. Now all this does is use I have to admit that "my heart isn't into this so much anymore".. ;-D The reason I started this was that I wanted to subclass some a class which proved to be really hard. I ended up using a |
716b4d8 to
e48481c
Compare
87e32e0 to
7071815
Compare
Make sure to use ModelAdmin.opts in admin.py in order to get the correct app_label and model_name. This is important when a subclass (e.g. of Newsletter) is used.