In this tutorial, we will see how it is easy to add extra context variables to change_list or change_form in Django Admin.
Continue ReadingBasic tutorials
How to add a database view to Django admin?
April 2020
Sometimes we want to display data which come from a database view and not from a Django model. It could be a view calculated by a stored procedure. It is super easy to do that.
Continue ReadingHow to add or edit models and related model on same page ?
April 2020
Sometimes when editing or adding a model in the admin, we would like to add values for related models at the same time. That’s the purpose of this tutorial
Continue ReadingHow to add a custom field in listview page ?
April 2020
To display fields of a model in listview page of the admin, we use the instruction :
list_display = ('user','refShop','title')
which tells django admin which fields to display. But what if we want to add a custom field such as a button, a link or a calculated field ?
Continue ReadingHow to override save method in admin ?
April 2020
Sometimes after adding or editing model in the admin, it should be useful to do some custom code when saving the data.
Continue Reading