tg.request.params

Here are the examples of the python api tg.request.params taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: fedora-packages Source File: mw.py
    def prof_collector(self, environ, request, start_response):
        p = request.params
        profile_id = p['id']
        directory = config.get('profile.dir', '')
        if self.outstanding_profile_ids.pop(profile_id, False):
            prof_file_name = "jsonrequest_%s.jsprof" % profile_id

            # output profiling data
            file_name = os.path.join(directory, prof_file_name)
            f = open(file_name, 'w')
            f.write('{"id": "%s", "start_time": %s, "callback_start_time": %s,'
                    ' "end_time": %s}'
                    % (profile_id, p['start_time'], p['callback_start_time'],
                       p['end_time']))
            f.close()
            return Response('{}')(environ, start_response)

        return Response(status='404 Not Found')(environ, start_response)