Not logged in
Check-in [72aecd3a47]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Handle get requests with parameters.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:72aecd3a475da062f6782f8ab99105f7edd3f109
User & Date: petr 2010-11-12 18:30:20
Context
2010-11-12
19:11
Fixed logging module to use just plain pickle. check-in: 7598aac125 user: petr tags: trunk
18:30
Handle get requests with parameters. check-in: 72aecd3a47 user: petr tags: trunk
18:10
Application is now using python logging. check-in: 29adb27577 user: petr tags: trunk
Changes

Changes to web.py.

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
                p.close()
            except:
                pass
        return calls

    def get(self):
        t_calls = Template("templates/global.tpl", content="templates/calls.tpl")
        if self.request.path.endswith("missed"):
            ct = "Missed calls"
            calls = self.missed()
        elif self.request.path.endswith("dialed"):
            ct = "Dialed calls"
            calls = self.dialed()
        elif self.request.path.endswith("received"):
            ct = "Received calls"
................................................................................
            SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
            return
        elif self.path.startswith("/favicon.ico"):
            self.path = "/static/favicon.ico"
            SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
            return
        else:
            if self.path in mapping.keys():
                h = mapping[self.path](self)
                h.get()
                h.flush()
            else:
                self.send_error(404)

    def do_HEAD(self):
        self.send_response(200)







|







 







|
|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
                p.close()
            except:
                pass
        return calls

    def get(self):
        t_calls = Template("templates/global.tpl", content="templates/calls.tpl")
        if self.request.path.startswith("/calls/missed"):
            ct = "Missed calls"
            calls = self.missed()
        elif self.request.path.endswith("dialed"):
            ct = "Dialed calls"
            calls = self.dialed()
        elif self.request.path.endswith("received"):
            ct = "Received calls"
................................................................................
            SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
            return
        elif self.path.startswith("/favicon.ico"):
            self.path = "/static/favicon.ico"
            SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
            return
        else:
            if self.path.split("?")[0] in mapping.keys():
                h = mapping[self.path.split("?")[0]](self)
                h.get()
                h.flush()
            else:
                self.send_error(404)

    def do_HEAD(self):
        self.send_response(200)