Example #1
0
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"])
    ]
Example #2
0
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
Example #3
0
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
Example #4
0
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"
Example #5
0
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
Example #6
0
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"])
    ]
Example #7
0
class NormName_Admin(admin.ModelAdmin):
    list_display = ("name", "created")
    search_fields = ("name", "created")
    actions = [export_as_csv_action("CSV Export", fields=["name", "created"])]