source: src/django_gheat/gheat/admin.py@ 11407

Last change on this file since 11407 was 11406, checked in by rick, 12 years ago

Re-install of heatmap on other server with Django 1.4

File size: 1.3 KB
RevLine 
[9590]1from gheat.models import *
[9041]2from django.contrib import admin
3
[9819]4class AccesspointAdmin(admin.ModelAdmin):
[9818]5 list_display = ['ssid','type', 'mac', 'organization']
[11406]6 search_fields = ['ssid', 'mac', 'organization__name']
[9592]7 ordering = ['ssid']
[9819]8admin.site.register(Accesspoint, AccesspointAdmin)
[9579]9
[9395]10class MeetBestandInline(admin.TabularInline):
11 model = MeetBestand
[9747]12 readonly_fields = ['is_imported']
13
[9395]14class MeetRondjeAdmin(admin.ModelAdmin):
15 inlines = [ MeetBestandInline, ]
[9585]16admin.site.register(MeetRondje, MeetRondjeAdmin)
[9395]17
[9590]18class NodeAdmin(admin.ModelAdmin):
19 list_display = ['name','latitude', 'longitude', 'organization']
20 ordering = ['name']
21admin.site.register(Node, NodeAdmin)
22
[9592]23class OrganizationAdmin(admin.ModelAdmin):
[9593]24 list_display = ['name', 'fullname']
[9592]25 ordering = ['name']
26admin.site.register(Organization, OrganizationAdmin)
27
[9637]28class MeetBestandAdmin(admin.ModelAdmin):
[9747]29 list_display = ['meetrondje', 'bestand', 'filetype', 'is_imported']
30 readonly_fields = ['is_imported']
[9637]31admin.site.register(MeetBestand, MeetBestandAdmin)
32
[9585]33admin.site.register(Apparatuur)
34admin.site.register(Gebruiker)
35
36class MetingAdmin(admin.ModelAdmin):
[9819]37 list_display = ['accesspoint', 'latitude', 'longitude', 'signaal']
38 search_fields = ['accesspoint__ssid']
[9585]39admin.site.register(Meting, MetingAdmin)
Note: See TracBrowser for help on using the repository browser.