admin.py 396 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
from django import contrib
# from django.utils.translation import ugettext_lazy as _

from .models import Disk, DataStore


class DiskAdmin(contrib.admin.ModelAdmin):
    list_display = ('name', 'datastore')


class DataStoreAdmin(contrib.admin.ModelAdmin):
    list_display = ('name', 'path')


contrib.admin.site.register(Disk, DiskAdmin)
contrib.admin.site.register(DataStore, DataStoreAdmin)