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.
16 lines
567 B
16 lines
567 B
from django.contrib import admin
|
|
from .models import Flower, FlowerCategory, CultivationTip, Carousel
|
|
|
|
@admin.register(Flower)
|
|
class FlowerAdmin(admin.ModelAdmin):
|
|
list_display = ['name', 'category', 'difficulty', 'created_at']
|
|
list_filter = ['category', 'difficulty']
|
|
search_fields = ['name', 'scientific_name']
|
|
|
|
@admin.register(Carousel)
|
|
class CarouselAdmin(admin.ModelAdmin):
|
|
list_display = ['title', 'sort_order', 'is_active']
|
|
list_editable = ['sort_order', 'is_active']
|
|
|
|
admin.site.register(FlowerCategory)
|
|
admin.site.register(CultivationTip) |