1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 06:44:21 +00:00

Make a common CoreAdmin class

This commit is contained in:
Steffo 2021-04-08 14:24:08 +02:00
parent 667c7724e5
commit d748ca272b

View file

@ -2,16 +2,22 @@ from django.contrib import admin
from . import models
class CoreAdmin(admin.ModelAdmin):
"""
:class:`django.contrib.admin.ModelAdmin` class from which all other admin classes inherit.
"""
@admin.register(models.Project)
class ProjectAdmin(admin.ModelAdmin):
class ProjectAdmin(CoreAdmin):
pass
@admin.register(models.DataSource)
class DataSourceAdmin(admin.ModelAdmin):
class DataSourceAdmin(CoreAdmin):
pass
@admin.register(models.DataFlow)
class DataFlowAdmin(admin.ModelAdmin):
class DataFlowAdmin(CoreAdmin):
pass