~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlmaps/views.py

  • Committer: franku
  • Date: 2016-07-02 12:38:06 UTC
  • mfrom: (404.2.56 widelands)
  • Revision ID: somal@arcor.de-20160702123806-q69u3d48s1prrxds
merged the django1_8 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    m.nr_downloads += 1
66
66
    m.save()
67
67
 
68
 
    response = HttpResponse(data, mimetype='application/octet-stream')
 
68
    response = HttpResponse(data, content_type='application/octet-stream')
69
69
    response['Content-Disposition'] = 'attachment; filename="%s"' % filename
70
70
 
71
71
    return response
74
74
def view(request, map_slug):
75
75
    map = get_object_or_404(models.Map, slug=map_slug)
76
76
    context = {
77
 
        #"average_rating": _average_rating( map.rating ),
78
77
        'map': map,
79
78
    }
80
79
    return render_to_response('wlmaps/map_detail.html',