added vehicles and vehicles extra, dynamic tables for entities, dynamic dropdowns with overlay for selecting and manage data
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
from django.contrib import admin
|
||||
from .models import Nomenclature, NomenclatureField, NomenclatureEntry
|
||||
|
||||
# Register your models here.
|
||||
|
||||
class NomenclatureFieldInline(admin.TabularInline):
|
||||
model = NomenclatureField
|
||||
extra = 1
|
||||
|
||||
|
||||
@admin.register(Nomenclature)
|
||||
class NomenclatureAdmin(admin.ModelAdmin):
|
||||
list_display = ['code', 'name', 'applies_to', 'kind', 'sort_order']
|
||||
list_filter = ['applies_to', 'kind']
|
||||
search_fields = ['code', 'name']
|
||||
inlines = [NomenclatureFieldInline]
|
||||
|
||||
|
||||
@admin.register(NomenclatureEntry)
|
||||
class NomenclatureEntryAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', '__str__', 'nomenclature', 'is_active']
|
||||
list_filter = ['nomenclature', 'is_active']
|
||||
|
||||
Reference in New Issue
Block a user