21 lines
626 B
Python
21 lines
626 B
Python
from django.contrib import admin
|
|
from .models import Species, Plant, PruningLog
|
|
|
|
|
|
@admin.register(Species)
|
|
class SpeciesAdmin(admin.ModelAdmin):
|
|
list_display = ['common_name', 'scientific_name', 'perenual_id']
|
|
search_fields = ['common_name', 'scientific_name']
|
|
|
|
|
|
@admin.register(Plant)
|
|
class PlantAdmin(admin.ModelAdmin):
|
|
list_display = ['name', 'species', 'location', 'is_indoor', 'date_added']
|
|
list_filter = ['is_indoor']
|
|
search_fields = ['name', 'location']
|
|
|
|
|
|
@admin.register(PruningLog)
|
|
class PruningLogAdmin(admin.ModelAdmin):
|
|
list_display = ['plant', 'pruned_on']
|
|
list_filter = ['pruned_on']
|