hi everyone
i search for this problem but i dont find somthing useful not in documentation not in previous topics
i know if i just Definition inlines evrithing will be fine but my inline goes last part but i want it between the parts.
how can i do that.
sorry for my bad english if my topic has any problem In terms of english i apologetic
The only way I can see to do this is if you override the appropriate template(s). At a minimum I can see needing to modify change_form.html
. (Or, you could do this by modifying the add_form_template
and change_form_template
attributes of the ModelAdmin class to refer to your custom template for only those models where you wish to do this.)
Then, it’s still up to you to indicate how these elements are going to be rendered within those templates. I would suggest you read the existing change_form.html
template to see how it renders the existing form fields.
tankyou mr ken . but there isn’t any way to do this like fields object in that json? i mean just definition another object?
No, this really fits into the case where you’re trying to do something that the admin isn’t designed to do.
The most appropriate answer to your question really is: Don’t use the admin for this. Create your own views. See the first two paragraphs of the docs at The Django admin site | Django documentation | Django