This commit is contained in:
@@ -232,9 +232,9 @@ class ServiceOrderAdmin(ModelAdmin):
|
|||||||
|
|
||||||
@admin.register(VCCourse)
|
@admin.register(VCCourse)
|
||||||
class VCCourseAdmin(OrderableAdminMixin, ModelAdmin):
|
class VCCourseAdmin(OrderableAdminMixin, ModelAdmin):
|
||||||
list_display = ('title', 'course_type', 'price', 'tag', 'instructor', 'lesson_count', 'duration', 'created_at', 'order_actions')
|
list_display = ('title', 'course_type', 'is_video_course', 'price', 'tag', 'instructor', 'lesson_count', 'duration', 'created_at', 'order_actions')
|
||||||
search_fields = ('title', 'description', 'instructor', 'tag')
|
search_fields = ('title', 'description', 'instructor', 'tag')
|
||||||
list_filter = ('course_type', 'instructor', 'tag')
|
list_filter = ('course_type', 'is_video_course', 'instructor', 'tag')
|
||||||
actions = ['reset_ordering']
|
actions = ['reset_ordering']
|
||||||
|
|
||||||
@admin.action(description="重置排序 (按ID顺序)")
|
@admin.action(description="重置排序 (按ID顺序)")
|
||||||
@@ -262,6 +262,10 @@ class VCCourseAdmin(OrderableAdminMixin, ModelAdmin):
|
|||||||
('基本信息', {
|
('基本信息', {
|
||||||
'fields': ('title', 'description', 'course_type', 'tag', 'price')
|
'fields': ('title', 'description', 'course_type', 'tag', 'price')
|
||||||
}),
|
}),
|
||||||
|
('视频设置', {
|
||||||
|
'fields': ('is_video_course', 'video_url'),
|
||||||
|
'description': '设置是否为视频课程及视频链接'
|
||||||
|
}),
|
||||||
('课程安排', {
|
('课程安排', {
|
||||||
'fields': ('is_fixed_schedule', 'start_time', 'end_time'),
|
'fields': ('is_fixed_schedule', 'start_time', 'end_time'),
|
||||||
'description': '勾选“是否固定时间课程”后,请设置开始和结束时间'
|
'description': '勾选“是否固定时间课程”后,请设置开始和结束时间'
|
||||||
|
|||||||
Reference in New Issue
Block a user