Hello, world

   1 from django.http import HttpResponse
   2 
   3 def hello(request):
   4     html="""<html>
   5     <body>
   6     <h1>Hello, world</h1>
   7     </body>
   8     </html>
   9     """
  10     return(HttpResponse(html))
views.py

   1     (r'^hello/$', views.hello)

   1 import views

Celý projekt máte tu: hello.tar.gz

KMaDGWiki: ProgramovanieInternetovychAplikacii/HelloWorld (last edited 2009-02-26 10:01:43 by 147)