1 | from gheat.models import *
|
---|
2 | from django.contrib import admin
|
---|
3 |
|
---|
4 | class AccesspointAdmin(admin.ModelAdmin):
|
---|
5 | list_display = ['ssid','type', 'mac', 'organization']
|
---|
6 | search_fields = ['ssid', 'mac', 'organization__name']
|
---|
7 | ordering = ['ssid']
|
---|
8 | admin.site.register(Accesspoint, AccesspointAdmin)
|
---|
9 |
|
---|
10 | class MeetBestandInline(admin.TabularInline):
|
---|
11 | model = MeetBestand
|
---|
12 | readonly_fields = ['is_imported']
|
---|
13 |
|
---|
14 | class MeetRondjeAdmin(admin.ModelAdmin):
|
---|
15 | inlines = [ MeetBestandInline, ]
|
---|
16 | admin.site.register(MeetRondje, MeetRondjeAdmin)
|
---|
17 |
|
---|
18 | class NodeAdmin(admin.ModelAdmin):
|
---|
19 | list_display = ['name','latitude', 'longitude', 'organization']
|
---|
20 | ordering = ['name']
|
---|
21 | admin.site.register(Node, NodeAdmin)
|
---|
22 |
|
---|
23 | class OrganizationAdmin(admin.ModelAdmin):
|
---|
24 | list_display = ['name', 'fullname']
|
---|
25 | ordering = ['name']
|
---|
26 | admin.site.register(Organization, OrganizationAdmin)
|
---|
27 |
|
---|
28 | class MeetBestandAdmin(admin.ModelAdmin):
|
---|
29 | list_display = ['meetrondje', 'bestand', 'filetype', 'is_imported']
|
---|
30 | readonly_fields = ['is_imported']
|
---|
31 | admin.site.register(MeetBestand, MeetBestandAdmin)
|
---|
32 |
|
---|
33 | admin.site.register(Apparatuur)
|
---|
34 | admin.site.register(Gebruiker)
|
---|
35 |
|
---|
36 | class MetingAdmin(admin.ModelAdmin):
|
---|
37 | list_display = ['accesspoint', 'latitude', 'longitude', 'signaal']
|
---|
38 | search_fields = ['accesspoint__ssid']
|
---|
39 | admin.site.register(Meting, MetingAdmin)
|
---|