Django

Code

root/django/branches/sqlalchemy/examples/views.py

Revision 2809, 0.6 kB (checked in by adrian, 3 years ago)

MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.

Line 
1 from django import http
2
3 def index(request):
4     r = http.HttpResponse('<h1>Django examples</h1><ul>')
5     r.write('<li><a href="hello/html/">Hello world (HTML)</a></li>')
6     r.write('<li><a href="hello/text/">Hello world (text)</a></li>')
7     r.write('<li><a href="hello/write/">HttpResponse objects are file-like objects</a></li>')
8     r.write('<li><a href="hello/metadata/">Displaying request metadata</a></li>')
9     r.write('<li><a href="hello/getdata/">Displaying GET data</a></li>')
10     r.write('<li><a href="hello/postdata/">Displaying POST data</a></li>')
11     r.write('</ul>')
12     return r
Note: See TracBrowser for help on using the browser.