Attachment 'views.py'

Download

   1 from django.http import HttpResponse
   2 from django.template import Context,loader
   3 
   4 def hello(request,who):
   5     t=loader.get_template('hello.html')
   6     c=Context({'who':who})
   7     html=t.render(c)
   8     return(HttpResponse(html))
   9 
  10 def goodbye(request,who):
  11     t=loader.get_template('goodbye.html')
  12     c=Context({'who':who})
  13     html=t.render(c)
  14     return(HttpResponse(html))

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-02-24 15:21:09, 0.3 KB) [[attachment:common.txt]]
  • [get | view] (2009-02-24 15:22:36, 0.1 KB) [[attachment:goodbye.txt]]
  • [get | view] (2009-02-24 15:21:57, 0.1 KB) [[attachment:hello.txt]]
  • [get | view] (2009-02-24 15:27:01, 6.3 KB) [[attachment:hello_v4.tar.gz]]
  • [get | view] (2009-02-24 15:24:23, 0.4 KB) [[attachment:views.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.