Gitlab CSE Unil

admin.py 721 Bytes
Newer Older
Julien Furrer's avatar
Julien Furrer committed
1
2
3
4
# coding=utf-8
from __future__ import unicode_literals
from django.contrib import admin

5
from adim.models import AnObj, Annotation  # AOSchema, AOType, AOAttribute, AOChoice
Julien Furrer's avatar
Julien Furrer committed
6
7


8
9
class AnObjAdmin(admin.ModelAdmin):
    list_filter = ('owner',)
Julien Furrer's avatar
Julien Furrer committed
10
11
admin.site.register(AnObj, AnObjAdmin)

12
# admin.site.register(AOType)
Julien Furrer's avatar
Julien Furrer committed
13

14
15
16
# class AOSchemaAdmin(BaseSchemaAdmin):
#     filter_horizontal = ('ao_types', )
# admin.site.register(AOSchema, AOSchemaAdmin)
Julien Furrer's avatar
Julien Furrer committed
17

18
19
20
21
# class AOChoiceAdmin(admin.ModelAdmin):
#     list_filter = ('schema', )
# admin.site.register(AOChoice, AOChoiceAdmin)
# admin.site.register(AOAttribute)
22
23
24
class AnnotationAdmin(admin.ModelAdmin):
    list_filter = ('annotable', )
admin.site.register(Annotation, AnnotationAdmin)