~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to src/dispatch/__init__.py

  • Committer: mattgiuca
  • Date: 2007-12-11 06:19:09 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:28
src/conf: Added a handful of configuration files with some basic info needed
    for the dispatcher.
src/media: Added a sample image (images/mime/dir.png).
    (From Nuvola free icons library)
src/dispatch/__init__.py: Uses conf.root_dir to get a path to media and
    display an image.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
# Then passes the request along to the appropriate ivle app.
28
28
 
29
29
from mod_python import apache
 
30
import os
 
31
import os.path
 
32
import conf
30
33
 
31
34
def handler(req):
32
35
    # TEMP: Dummy (test) handler
33
 
    req.content_type = "text/plain"
34
 
    req.write("Hello, IVLE!\n")
 
36
    req.content_type = "text/html"
 
37
    req.write("<html>")
 
38
    req.write("<p>Hello, IVLE!</p>")
 
39
    req.write('<p><img src="' + os.path.join(conf.root_dir,
 
40
        "media/images/mime/dir.png") + '" /> ')
35
41
    req.write(str(req.uri))
 
42
    req.write("</p></html>")
36
43
    return apache.OK
37
44