# HG changeset patch # User paulb # Date 1115060120 0 # Node ID 2b8d54a8c18d93132f7019dd3eea0c5b6c87e62e # Parent a65d768d71e91edaa0da6bc9e0b06c7c83cd728f [project @ 2005-05-02 18:55:20 by paulb] The stylesheet is no longer handled in the application itself. Removed the WebDAV code for now. diff -r a65d768d71e9 -r 2b8d54a8c18d examples/Common/Configurator/__init__.py --- a/examples/Common/Configurator/__init__.py Mon May 02 18:54:40 2005 +0000 +++ b/examples/Common/Configurator/__init__.py Mon May 02 18:55:20 2005 +0000 @@ -41,21 +41,12 @@ def respond(self, trans): - # Produce stylesheet. - - if trans.get_path_info().split("/")[-1] == "styles.css": - trans.set_content_type(WebStack.Generic.ContentType("text/css", self.encoding)) - out = trans.get_response_stream() - f = open(os.path.join(self.resource_dir, "styles.css"), "rb") - out.write(f.read()) - f.close() - raise WebStack.Generic.EndOfResponse - global XSLForms # NOTE: Strangely required to avoid UnboundLocalError! - method = trans.get_request_method() # Only obtain field information according to the stated method. + method = trans.get_request_method() + if method == "GET": fields = XSLForms.Fields.Fields(encoding="iso-8859-1", values_are_lists=1) parameters = trans.get_fields_from_path() @@ -64,28 +55,6 @@ fields = XSLForms.Fields.Fields(encoding=self.encoding, values_are_lists=1) parameters = trans.get_fields_from_body(self.encoding) documents = fields.make_documents(parameters.items()) - elif method == "PROPFIND": - dav_xsl = os.path.join(self.resource_dir, "config_dav.xsl") - database_xml = os.path.join(self.resource_dir, "config_database.xml") - database = libxml2dom.parse(database_xml) - - # Process the path. - - parts = trans.get_path_info().split("/") - if not parts[-1]: - del parts[-1] - - start = parts[-1] - path = "/".join(parts) - proc = XSLOutput.Processor([dav_xsl], parameters={ - "path" : path, - "start" : start - }) - - trans.set_response_code(207) - proc.send_output(trans.get_response_stream(), trans.get_response_stream_encoding(), - database) - raise WebStack.Generic.EndOfResponse else: trans.set_response_code(405) raise WebStack.Generic.EndOfResponse