1 from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, HttpResponseServerError, HttpResponseForbidden
2 from django.template import RequestContext
3 from django.shortcuts import get_object_or_404, render_to_response
4 from madrona.common import default_mimetypes as mimetypes
5 from madrona.common.utils import KmlWrap
6 from django.core.urlresolvers import reverse
7
8 from django.conf import settings
9
10 from madrona.studyregion import models
11 from django.views.decorators.cache import cache_page
12
13 -def studyregion(request, template_name='studyregion/studyregion.html'):
14 """Main application window
15 """
16 return render_to_response(template_name, RequestContext(request,{'api_key':settings.GOOGLE_API_KEY}))
17
18 -def show(request, pk):
19 """Display a map with the study region geometry.
20 """
21 return render_to_response('studyregion/show.html', RequestContext(request,{'api_key':settings.GOOGLE_API_KEY, 'pk': pk}))
22
23 -def kml(request, pk):
28
29 @cache_page(60 * 60 * 24)
30 -def regionKml(request):
36
45
53