Created
October 29, 2022 17:27
-
-
Save KabakiAntony/1932b8c6181a416f7062f8daaa66d13b to your computer and use it in GitHub Desktop.
custom productadmin class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProductAdmin(admin.ModelAdmin): | |
# define how the custom form is going to be rendered | |
list_display = ['name','description','category','price', 'stock', 'available', 'date'] | |
# also make a change to this registration line | |
# by adding ProductAdmin to the register method | |
tonyonline_admin_site.register(Product, ProductAdmin) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment