In this tutorial we will learn basic, custom and advanced filtering like chaining filters with the Django admin.
Continue ReadingAdvanced tutorials
How to make Ajax request in Django Admin changeview page ?
April 2020
In this tutorial, we will learn how to create an Ajax request to validate some data while editing a value of a model in the Django Admin change_form.
Continue ReadingHow to display foreign key values to listview page ?
April 2020
In this tutorial we will learn how to customize the listview page of a specific model to show the values of a foreign key.
Continue ReadingHow to initialize an inline formset and do some custom validations
April 2020
You can find the source code in this repository
In previous tutorial we have seen how to add inlines in our django admin for Shop and Product models. This tutorial explains how to go a step further. Let’s imagine our user has set the planning for his shop and now you like to add a new product. It could be nice to avoid him setting again the planning for the product and so to initialize it with the planning of the shop as default values.
Continue ReadingDjango Admin : How to display change form with prefilled values
April 2020
Sometimes when editing a model in the Django admin, we would like to have some fields prefilled with some values such as foreign key, date … This is the purpose of this tutorial
Continue Reading