blob: 3b24ec297d13aad6e73cafda2e439b49ddb10d79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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",)
}
|