Skip to content

Commit

Permalink
updated mimetype to content_type
Browse files Browse the repository at this point in the history
  • Loading branch information
tamarmot committed Dec 31, 2014
1 parent 3689498 commit 97c7bdc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions geocamTrack/views.py
Expand Up @@ -73,7 +73,7 @@ def wrapKml(text):

def getKmlResponse(text):
return HttpResponse(wrapKml(text),
mimetype='application/vnd.google-earth.kml+xml')
content_type='application/vnd.google-earth.kml+xml')


def getKmlNetworkLink(request):
Expand Down Expand Up @@ -115,7 +115,7 @@ def dumps(obj):

def getResourcesJson(request):
return HttpResponse(dumps(getGeoJsonDictWithErrorHandling()),
mimetype='application/json')
content_type='application/json')


def postPosition(request):
Expand Down Expand Up @@ -164,7 +164,7 @@ def postPosition(request):
PastResourcePosition(resource=resource, **attrs).save()

return HttpResponse(dumps(dict(result='ok')),
mimetype='application/json')
content_type='application/json')


def getLiveMap(request):
Expand All @@ -180,7 +180,7 @@ def getLiveMap(request):

def getIcon(request, userName):
return HttpResponse(renderAvatar(request, userName),
mimetype='image/png')
content_type='image/png')


def utcToDefaultTime(t):
Expand Down Expand Up @@ -413,7 +413,7 @@ def getTrackIndexKml(request):
</Document>
</kml>
""")
return HttpResponse(out.getvalue(), mimetype='application/vnd.google-earth.kml+xml')
return HttpResponse(out.getvalue(), content_type='application/vnd.google-earth.kml+xml')


@cache_page(0.9 * settings.GEOCAM_TRACK_CURRENT_POS_REFRESH_TIME_SECONDS)
Expand Down Expand Up @@ -498,7 +498,7 @@ def getTracksKml(request, recent=True):
</Document>
</kml>
""")
return HttpResponse(out.getvalue(), mimetype='application/vnd.google-earth.kml+xml')
return HttpResponse(out.getvalue(), content_type='application/vnd.google-earth.kml+xml')


def getCsvTrackLink(day, trackName, startTimeUtc=None, endTimeUtc=None):
Expand Down Expand Up @@ -595,7 +595,7 @@ def getTrackCsv(request, fname):

prevPos = pos
response = HttpResponse(out.getvalue(),
mimetype='text/csv')
content_type='text/csv')
response['Content-disposition'] = 'attachment; filename=%s' % fname
return response

Expand Down

0 comments on commit 97c7bdc

Please sign in to comment.