view hgscm/apps/www/views.py @ 207:c1c9a4f809ba

integrated quick_start and learn_mercurial into the django project (with links). Only missing parts: A wiki-page for links to learning resources and autodetection of the most current version.
author Arne Babenhauserheide <bab@draketo.de>
date Thu, 02 Jul 2009 15:35:27 +0200
parents 307dd774a9b6
children
line wrap: on
line source

from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.utils import simplejson
from django.conf import settings
from hgscm.apps.www.models import get_download, get_latest_version
import os

def frontpage(request):
    return render_to_response("frontpage.html", { },
        RequestContext(request))
def about(request):
    return render_to_response("about.html", { },
        RequestContext(request))
def who_uses(request):
    return render_to_response("who_uses.html", { },
        RequestContext(request))
def workflow_guide(request):
    return render_to_response("workflow_guide.html", { },
        RequestContext(request))
def quick_start(request):
    return render_to_response("quick_start.html", { },
        RequestContext(request))
def learn_mercurial(request):
    return render_to_response("learn_mercurial.html", { },
        RequestContext(request))
def thepage(request):
    return render_to_response("thepage.html", { },
        RequestContext(request))
def download(request, 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)
    f.close()
    return render_to_response("downloads.html", {'downloads': list},
        RequestContext(request))