@@ -3,23 +3,16 @@ |
||
3 | 3 |
from django.contrib import admin |
4 | 4 |
|
5 | 5 |
from coupon.models import CouponInfo, UserCouponInfo |
6 |
-from mch.models import ActivityInfo |
|
7 |
-from member.models import RightInfo |
|
8 | 6 |
|
9 | 7 |
|
10 | 8 |
class CouponInfoAdmin(admin.ModelAdmin): |
11 | 9 |
list_display = ('brand_id', 'brand_name', 'coupon_id', 'coupon_title', 'coupon_value', 'coupon_expire_type', 'coupon_valid_period', 'coupon_expire_at', 'status', 'created_at', 'updated_at') |
12 |
- readonly_fields = ('coupon_id', 'created_at', 'updated_at') |
|
13 |
- |
|
14 |
- def save_model(self, request, obj, form, change): |
|
15 |
- obj.save() |
|
16 |
- |
|
17 |
- # TODO: Update ActivityInfo/RightInfo |
|
10 |
+ list_filter = ('brand_id', 'coupon_expire_type', 'status') |
|
18 | 11 |
|
19 | 12 |
|
20 | 13 |
class UserCouponInfoAdmin(admin.ModelAdmin): |
21 | 14 |
list_display = ('brand_id', 'brand_name', 'coupon_id', 'user_id', 'coupon_title', 'coupon_value', 'active_at', 'expire_at', 'coupon_valid_period', 'coupon_limit_brand_ids', 'has_used', 'admin_id', 'used_at', 'status', 'created_at', 'updated_at') |
22 |
- list_filter = ('has_used', 'status') |
|
15 |
+ list_filter = ('brand_id', 'has_used', 'status') |
|
23 | 16 |
|
24 | 17 |
|
25 | 18 |
admin.site.register(CouponInfo, CouponInfoAdmin) |
@@ -196,11 +196,6 @@ class ActivityInfoAdmin(admin.ModelAdmin): |
||
196 | 196 |
list_display = ('activity_name', 'model_uni_names', 'start_at', 'end_at', 'coupon_expire_type', 'coupon_valid_period', 'coupon_expire_at', 'coupon_value', 'status', 'created_at', 'updated_at') |
197 | 197 |
list_filter = ('coupon_expire_type', 'status') |
198 | 198 |
|
199 |
- def save_model(self, request, obj, form, change): |
|
200 |
- obj.save() |
|
201 |
- |
|
202 |
- # TODO: Update coupon relative |
|
203 |
- |
|
204 | 199 |
|
205 | 200 |
admin.site.register(AdministratorInfo, AdministratorInfoAdmin) |
206 | 201 |
admin.site.register(OperatorInfo, OperatorInfoAdmin) |
@@ -31,11 +31,6 @@ class RightInfoAdmin(admin.ModelAdmin): |
||
31 | 31 |
list_display = ('right_id', 'right_type', 'icon', 'title', 'subtitle', 'detail', 'level1', 'level2', 'level3', 'level4', 'level5', 'minlevel', 'position', 'is_send_coupon', 'coupon_num', 'coupon_level1_id', 'coupon_level2_id', 'coupon_level3_id', 'status', 'created_at', 'updated_at') |
32 | 32 |
list_filter = ('right_type', 'is_send_coupon', 'status') |
33 | 33 |
|
34 |
- def save_model(self, request, obj, form, change): |
|
35 |
- obj.save() |
|
36 |
- |
|
37 |
- # TODO: Update coupon relative |
|
38 |
- |
|
39 | 34 |
|
40 | 35 |
class ShotTypeInfoAdmin(admin.ModelAdmin): |
41 | 36 |
list_display = ('shot_type_id', 'shot_type_name', 'position', 'status', 'created_at', 'updated_at') |