class Seller_Admin(admin.ModelAdmin): list_display = ("name", "created", "contact", "phone", "email") search_fields = ("name", "created", "contact", "phone", "email") actions = [ export_as_csv_action( "CSV Export", fields=["name", "created", "contact", "phone", "email"]) ]
class BuyPlan_Admin(admin.ModelAdmin): list_display = ("name", "created", "catOne", "catTwo") search_fields = ("name", "created", "catOne", "catTwo") actions = [ export_as_csv_action("CSV Export", fields=["name", "created", "catOne", "catTwo"]) ] form = BuyPlan_Form
class Rent_Admin(admin.ModelAdmin): list_display = ("name", "created", "cat_one", "cat_two", "price", "m2") search_fields = ("name", "created", "cat_one", "cat-two", "price", "m2") actions = [ export_as_csv_action( "CSV Export", fields=["name", "created", "cat_one", "cat_two", "price", "m2"]) ] form = Rent_Form
class Token_Admin(admin.ModelAdmin): list_display = ("value", "get_userId") search_fields = ("value", "user_id") actions = [ export_as_csv_action("CSV Export", fields=["name", "get_userId"]) ] def get_userId(self, obj): return obj.user get_userId.admin_order_field = "user__id"
class Buy_Admin(admin.ModelAdmin): list_display = ("ad_id", "name", "created", "cat_one", "cat_two", "price", "m2", "piece") search_fields = ("ad_id", "name", "created", "cat_one", "cat-two", "price", "m2", "piece") actions = [ export_as_csv_action("CSV Export", fields=[ "ad_id", "name", "created", "cat_one", "cat_two", "price", "m2", "piece" ]) ] form = Buy_Form
class Equipment_Admin(admin.ModelAdmin): list_display = ("name", "created", "value") search_fields = ("name", "created", "value") actions = [ export_as_csv_action("CSV Export", fields=["name", "created", "value"]) ]
class NormName_Admin(admin.ModelAdmin): list_display = ("name", "created") search_fields = ("name", "created") actions = [export_as_csv_action("CSV Export", fields=["name", "created"])]