salw/salw_admin/pssm_api/admin.py
2024-11-28 16:06:12 +01:00

24 lines
801 B
Python

from django.contrib import admin
from .models import Images, Impact_Stories, PSSM_Resources, African_Countries, PSSM_Countries
# Register your models here.
@admin.register(Images)
class ImagesAdmin(admin.ModelAdmin):
list_display = ('title', 'image')
@admin.register(Impact_Stories)
class Impact_StoriesAdmin(admin.ModelAdmin):
list_display = ('title', 'file')
@admin.register(PSSM_Resources)
class PSSM_ResourcesAdmin(admin.ModelAdmin):
list_display = ('title', 'file')
@admin.register(African_Countries)
class African_CountriesAdmin(admin.ModelAdmin):
display = ('name')
ordering = ('name',)
@admin.register(PSSM_Countries)
class PSSM_CountriesAdmin(admin.ModelAdmin):
list_display = ('country', 'recsa', 'ecowas')
ordering = ('recsa', 'ecowas','country')