| 1 | from django.contrib import admin |
| 2 | from . import models |
| 3 | |
| 4 | |
| 5 | @admin.register(models.Location) |
| 6 | class LocationAdmin(admin.ModelAdmin): |
| 7 | list_display = ('ip', 'city', 'region', 'country', 'loc', 'org', 'postal', 'timezone', 'bogon', 'success') |
| 8 | |
| 9 | @admin.register(models.Log) |
| 10 | class LogAdmin(admin.ModelAdmin): |
| 11 | list_display = ('endpoint', 'location', 'user', 'start_time', 'end_time') |
| 12 | |
| 13 | @admin.display() |
| 14 | def endpoint(self, obj): |
| 15 | return obj.meta['PATH_INFO'] |
| 16 | |