diff options
Diffstat (limited to 'app/planner/admin.py')
-rw-r--r-- | app/planner/admin.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/planner/admin.py b/app/planner/admin.py new file mode 100644 index 0000000..3b24ec2 --- /dev/null +++ b/app/planner/admin.py @@ -0,0 +1,37 @@ +from django.contrib import admin +from django import forms +from django.contrib.gis.admin import OSMGeoAdmin +from django.contrib.contenttypes.admin import GenericStackedInline + +from utils.widgets import AdminImageWidget, LGEntryForm +from .models import Camp + +from media.models import LuxImage +from utils.util import get_latlon + + +@admin.register(Camp) +class PlannerAdmin(OSMGeoAdmin): + list_display = ('name', 'date_arrive', 'date_depart', 'distance_from_previous', 'price', 'site_number',) + list_filter = ('date_arrive', 'has_water' ) + # options for OSM map Using custom ESRI topo map + lat, lon = get_latlon() + default_lon = lon + default_lat = lat + default_zoom = 10 + units = True + scrollable = False + map_width = 700 + map_height = 425 + map_template = 'gis/admin/osm.html' + openlayers_url = '/static/admin/js/OpenLayers.js' + + class Media: + js = ('image-loader.js', 'next-prev-links.js') + #'product-loader.js', + css = { + "all": ("my_styles.css",) + } + + + |