You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
512 B
21 lines
512 B
from django.contrib import admin
|
|
|
|
# Register your models here.
|
|
from choose.models import Tea, TeaType, TeaCategory
|
|
|
|
|
|
class TeaCategoryAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'shop_name')
|
|
|
|
|
|
class TeaTypeAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'shop_name', 'category')
|
|
|
|
|
|
class TeaAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'price', 'pic', 'type')
|
|
|
|
|
|
admin.site.register(Tea, TeaAdmin)
|
|
admin.site.register(TeaType, TeaTypeAdmin)
|
|
admin.site.register(TeaCategory, TeaCategoryAdmin)
|
|
|