mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-23 07:14:21 +00:00
✨ Make a common CoreAdmin class
This commit is contained in:
parent
f766926dcc
commit
2a9825d72f
1 changed files with 9 additions and 3 deletions
|
@ -2,16 +2,22 @@ from django.contrib import admin
|
||||||
from . import models
|
from . import models
|
||||||
|
|
||||||
|
|
||||||
|
class CoreAdmin(admin.ModelAdmin):
|
||||||
|
"""
|
||||||
|
:class:`django.contrib.admin.ModelAdmin` class from which all other admin classes inherit.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
@admin.register(models.Project)
|
@admin.register(models.Project)
|
||||||
class ProjectAdmin(admin.ModelAdmin):
|
class ProjectAdmin(CoreAdmin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@admin.register(models.DataSource)
|
@admin.register(models.DataSource)
|
||||||
class DataSourceAdmin(admin.ModelAdmin):
|
class DataSourceAdmin(CoreAdmin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@admin.register(models.DataFlow)
|
@admin.register(models.DataFlow)
|
||||||
class DataFlowAdmin(admin.ModelAdmin):
|
class DataFlowAdmin(CoreAdmin):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue