2020-05-16 02:12:21 +02:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2020-06-19 01:35:31 +02:00
|
|
|
from apps.gnous_eu.models import Service, Partner
|
2020-05-16 02:12:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
class ServicesAdmin(admin.ModelAdmin):
|
|
|
|
list_display = (
|
|
|
|
"id",
|
|
|
|
"name",
|
|
|
|
"sources",
|
|
|
|
"hosted",
|
|
|
|
"domain_tag",
|
|
|
|
"image_tag",
|
|
|
|
"hidden",
|
|
|
|
)
|
|
|
|
fieldsets = [
|
2020-05-16 14:40:22 +02:00
|
|
|
("Global", {"fields": ["name", "domain", "photo"]}),
|
|
|
|
("Descriptions", {"fields": ["description", "description_en"]}),
|
2020-05-16 02:12:21 +02:00
|
|
|
("Types", {"fields": ["sources", "hosted"]}),
|
|
|
|
("Misc", {"fields": ["hidden"]}),
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
admin.site.register(Service, ServicesAdmin)
|
2020-06-19 01:35:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
class PartnersAdmin(admin.ModelAdmin):
|
|
|
|
list_display = (
|
|
|
|
"id",
|
|
|
|
"name",
|
|
|
|
"domain_tag",
|
|
|
|
"image_tag",
|
|
|
|
"hidden",
|
|
|
|
)
|
|
|
|
fieldsets = [
|
|
|
|
("Global", {"fields": ["name", "domain", "photo"]}),
|
|
|
|
("Descriptions", {"fields": ["description", "description_en"]}),
|
|
|
|
("Misc", {"fields": ["hidden"]}),
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
admin.site.register(Partner, PartnersAdmin)
|