Attachment 'views.py'

Download

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

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