1 | from gheat.models import *
|
---|
2 | from django.contrib import admin
|
---|
3 |
|
---|
4 | class AccespointAdmin(admin.ModelAdmin):
|
---|
5 | list_display = ['ssid','mac', 'organization']
|
---|
6 | search_fields = ['ssid', 'mac', 'organization']
|
---|
7 | ordering = ['ssid']
|
---|
8 | admin.site.register(Accespoint, AccespointAdmin)
|
---|
9 |
|
---|
10 | class MeetBestandInline(admin.TabularInline):
|
---|
11 | model = MeetBestand
|
---|
12 | class MeetRondjeAdmin(admin.ModelAdmin):
|
---|
13 | inlines = [ MeetBestandInline, ]
|
---|
14 | admin.site.register(MeetRondje, MeetRondjeAdmin)
|
---|
15 |
|
---|
16 | class NodeAdmin(admin.ModelAdmin):
|
---|
17 | list_display = ['name','latitude', 'longitude', 'organization']
|
---|
18 | ordering = ['name']
|
---|
19 | admin.site.register(Node, NodeAdmin)
|
---|
20 |
|
---|
21 | class OrganizationAdmin(admin.ModelAdmin):
|
---|
22 | list_display = ['name', 'fullname']
|
---|
23 | ordering = ['name']
|
---|
24 | admin.site.register(Organization, OrganizationAdmin)
|
---|
25 |
|
---|
26 | admin.site.register(Apparatuur)
|
---|
27 | admin.site.register(Gebruiker)
|
---|
28 |
|
---|
29 | class MetingAdmin(admin.ModelAdmin):
|
---|
30 | list_display = ['accespoint', 'latitude', 'longitude', 'signaal']
|
---|
31 | search_fields = ['accespoint__ssid']
|
---|
32 | admin.site.register(Meting, MetingAdmin)
|
---|