admin.py 615 Bytes
Newer Older
Dalahro's avatar
Dalahro committed
1 2
from django.contrib import admin

chirac's avatar
chirac committed
3
from .models import Machine, MachineType, IpList, Interface
Dalahro's avatar
Dalahro committed
4 5

class MachineAdmin(admin.ModelAdmin):
6
    list_display = ('user','name','type','active')
Dalahro's avatar
Dalahro committed
7 8 9 10

class MachineTypeAdmin(admin.ModelAdmin):
    list_display = ('type',)

chirac's avatar
chirac committed
11 12 13 14
class IpListAdmin(admin.ModelAdmin):
    list_display = ('ipv4',)

class InterfaceAdmin(admin.ModelAdmin):
15
    list_display = ('machine','dns','mac_address','ipv4','details')
chirac's avatar
chirac committed
16

Dalahro's avatar
Dalahro committed
17 18
admin.site.register(Machine, MachineAdmin)
admin.site.register(MachineType, MachineTypeAdmin)
chirac's avatar
chirac committed
19 20
admin.site.register(IpList, IpListAdmin)
admin.site.register(Interface, InterfaceAdmin)