Mercurial > hg-website
diff hgscm/apps/www/views.py @ 78:8d25e34c21c2
templatetags: Add DownloadButton tag to display a download button according to operating system
This is somewhat a hacky way to do it, but it works, and we might redo it alter on.
author | David Soria Parra <dsp@php.net> |
---|---|
date | Fri, 20 Feb 2009 15:12:43 +0100 |
parents | 9be94f3dcaa0 |
children | d4b03ef491f2 |
line wrap: on
line diff
--- a/hgscm/apps/www/views.py Fri Feb 20 15:12:33 2009 +0100 +++ b/hgscm/apps/www/views.py Fri Feb 20 15:12:43 2009 +0100 @@ -7,7 +7,7 @@ import os def frontpage(request): - return render_to_response("frontpage.html", { 'latest_version': get_latest_version() }, + return render_to_response("frontpage.html", { }, RequestContext(request)) def about(request): return render_to_response("about.html", { }, @@ -16,7 +16,7 @@ return render_to_response("thepage.html", { }, RequestContext(request)) def download(request, platform, version): - return HttpResponseRedirect(get_download(platform, version)) + return HttpResponseRedirect(get_download(platform, version)['url']) def downloads(request): f = open(os.path.join(settings.MEDIA_ROOT, "downloads.json")) list = simplejson.load(f)