summaryrefslogtreecommitdiff
path: root/app/daily/admin.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-01-27 19:02:19 -0500
committerluxagraf <sng@luxagraf.net>2016-01-27 19:02:19 -0500
commit84e4e4876890d3eb670c76ccdb5111741a95c315 (patch)
tree4a27f9aa3f4fdfb1873bdd552b1fd233fe2738fd /app/daily/admin.py
parent45b7cf38679a55201acf066dc362e1e1c4fcbc9b (diff)
created a generic geoadmin class with some sane defaults and eliminated
a non TLS file in admin
Diffstat (limited to 'app/daily/admin.py')
-rw-r--r--app/daily/admin.py24
1 files changed, 7 insertions, 17 deletions
diff --git a/app/daily/admin.py b/app/daily/admin.py
index 704d0dc..b61a2ad 100644
--- a/app/daily/admin.py
+++ b/app/daily/admin.py
@@ -1,15 +1,18 @@
from django.contrib import admin
-from django.contrib.gis.admin import OSMGeoAdmin
-from utils.widgets import LGEntryForm
+from utils.widgets import LGEntryForm, OLAdminBase
from .models import CheckIn, Daily, Weather
-class WeatherAdmin(OSMGeoAdmin):
+class WeatherAdmin(OLAdminBase):
pass
-class DailyAdmin(OSMGeoAdmin):
+class CheckInAdmin(OLAdminBase):
+ pass
+
+
+class DailyAdmin(admin.ModelAdmin):
form = LGEntryForm
list_display = ('date', 'user', 'location')
list_filter = (
@@ -46,19 +49,6 @@ class DailyAdmin(OSMGeoAdmin):
return qs.filter(user=request.user)
-class CheckInAdmin(OSMGeoAdmin):
- list_display = ('date', 'location')
- default_lon = -9285175
- default_lat = 4025046
- default_zoom = 15
- units = True
- scrollable = False
- map_width = 700
- map_height = 425
- map_template = 'gis/admin/osm.html'
- openlayers_url = '/static/admin/js/OpenLayers.js'
-
-
admin.site.register(CheckIn, CheckInAdmin)
admin.site.register(Weather, WeatherAdmin)
admin.site.register(Daily, DailyAdmin)