thirdparty/google_appengine/lib/django/examples/views.py
author Lennard de Rijk <ljvderijk@gmail.com>
Fri, 14 Aug 2009 10:12:50 -0700
changeset 2772 bb96d2c3885e
parent 109 620f9b141567
permissions -rwxr-xr-x
Set new Melange version number to 0-5-20090814 in app.yaml.template.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
109
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     1
from django import http
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     2
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     3
def index(request):
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     4
    r = http.HttpResponse('<h1>Django examples</h1><ul>')
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     5
    r.write('<li><a href="hello/html/">Hello world (HTML)</a></li>')
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     6
    r.write('<li><a href="hello/text/">Hello world (text)</a></li>')
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     7
    r.write('<li><a href="hello/write/">HttpResponse objects are file-like objects</a></li>')
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     8
    r.write('<li><a href="hello/metadata/">Displaying request metadata</a></li>')
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     9
    r.write('<li><a href="hello/getdata/">Displaying GET data</a></li>')
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    10
    r.write('<li><a href="hello/postdata/">Displaying POST data</a></li>')
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    11
    r.write('</ul>')
620f9b141567 Load ../../google_appengine into trunk/thirdparty/google_appengine.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    12
    return r