-
Notifications
You must be signed in to change notification settings - Fork 3
/
admin.py
42 lines (31 loc) · 1.35 KB
/
admin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from django.contrib import admin
from tardis.microtardis.models import Experiment_Hidden
from tardis.microtardis.models import Dataset_Hidden
from tardis.microtardis.models import Datafile_Hidden
from tardis.microtardis.models import Dataset_Harvest
from tardis.microtardis.models import Datafile_Harvest
class Experiment_Hidden_Admin(admin.ModelAdmin):
list_display = ('experiment', 'hidden',)
ordering = ('id',)
list_filter = ('hidden',)
admin.site.register(Experiment_Hidden, Experiment_Hidden_Admin)
class Dataset_Hidden_Admin(admin.ModelAdmin):
list_display = ('dataset', 'hidden',)
ordering = ('id',)
list_filter = ('hidden',)
admin.site.register(Dataset_Hidden, Dataset_Hidden_Admin)
class Datafile_Hidden_Admin(admin.ModelAdmin):
list_display = ('datafile', 'hidden',)
ordering = ('id',)
list_filter = ('hidden',)
admin.site.register(Datafile_Hidden, Datafile_Hidden_Admin)
class Dataset_Harvest_Admin(admin.ModelAdmin):
list_display = ('dataset', 'created_time', 'instrument',)
ordering = ('id',)
list_filter = ('instrument',)
admin.site.register(Dataset_Harvest, Dataset_Harvest_Admin)
class Datafile_Harvest_Admin(admin.ModelAdmin):
list_display = ('datafile', 'created_time', 'instrument',)
ordering = ('id',)
list_filter = ('instrument',)
admin.site.register(Datafile_Harvest, Datafile_Harvest_Admin)