2021-10-07 08:59:57 +13:00
|
|
|
from django.contrib import admin
|
2021-11-04 11:18:04 +13:00
|
|
|
import right_tree.api.models as models
|
2021-10-07 08:59:57 +13:00
|
|
|
|
2021-11-05 16:18:47 +13:00
|
|
|
|
|
|
|
class ZoneAdmin(admin.ModelAdmin):
|
|
|
|
ordering = ['name', 'variant', 'refined_variant', 'id']
|
|
|
|
search_fields = ['name', 'variant', 'refined_variant', 'id']
|
|
|
|
|
|
|
|
|
|
|
|
class ZoneImageSegmentAdmin(admin.ModelAdmin):
|
|
|
|
autocomplete_fields = ['zone']
|
|
|
|
|
|
|
|
|
2021-11-04 11:18:04 +13:00
|
|
|
admin.site.register(models.Plant)
|
|
|
|
admin.site.register(models.SoilOrder)
|
|
|
|
admin.site.register(models.SoilLayer)
|
|
|
|
admin.site.register(models.SoilVariant)
|
|
|
|
admin.site.register(models.EcologicalRegion)
|
|
|
|
admin.site.register(models.EcologicalDistrictLayer)
|
|
|
|
admin.site.register(models.ToleranceLevel)
|
|
|
|
admin.site.register(models.HabitatImage)
|
|
|
|
admin.site.register(models.Habitat)
|
2021-11-05 16:18:47 +13:00
|
|
|
admin.site.register(models.Zone, ZoneAdmin)
|
|
|
|
admin.site.register(models.ZoneImageSegment, ZoneImageSegmentAdmin)
|