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

« back to all changes in this revision

Viewing changes to www/dispatch/request.py

  • Committer: mattgiuca
  • Date: 2008-01-10 21:47:53 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:169
Added global common css file (media/common/ivle.css).
dispatch.request: Added 2 new attributes: scripts and styles, which let apps
    specify arbitrary numbers of custom CSS and JavaScript files.
dispatch.html: Added media/common/ivle.css to the HTML header.
               Prints out all request custom CSS and JS files in the header.
apps.dummy: Test use of scripts and styles.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        title (write)
62
62
            String. HTML page title. Used if write_html_head_foot is True, in
63
63
            the HTML title element text.
 
64
        styles (write)
 
65
            List of strings. Write a list of URLs to CSS files here, and they
 
66
            will be incorporated as <link rel="stylesheet" type="text/css">
 
67
            elements in the head, if write_html_head_foot is True.
 
68
            URLs should be relative to the IVLE root; they will be fixed up
 
69
            to be site-relative.
 
70
        scripts (write)
 
71
            List of strings. Write a list of URLs to JS files here, and they
 
72
            will be incorporated as <script type="text/javascript"> elements
 
73
            in the head, if write_html_head_foot is True.
 
74
            URLs should be relative to the IVLE root; they will be fixed up
 
75
            to be site-relative.
64
76
        write_html_head_foot (write)
65
77
            Boolean. If True, dispatch assumes that this is an XHTML page, and
66
78
            will immediately write a full HTML head, open the body element,
162
174
        self.content_type = None        # Use Apache's default
163
175
        self.location = None
164
176
        self.title = None     # Will be set by dispatch before passing to app
 
177
        self.styles = []
 
178
        self.scripts = []
165
179
        self.write_html_head_foot = False
166
180
 
167
181
    def __writeheaders(self):