diff --git a/paramecio/cherry.py b/paramecio/cherry.py new file mode 100644 index 0000000..2fc4c62 --- /dev/null +++ b/paramecio/cherry.py @@ -0,0 +1,52 @@ +# Import your application as: +# from wsgi import application +# Example: + +from index import application +from settings import config + +# Import CherryPy +import cherrypy + +if __name__ == '__main__': + + cherrypy.config.update({'engine.autoreload.on': config.reloader}) + + # Mount the application + cherrypy.tree.graft(application, "/") + + # Unsubscribe the default server + cherrypy.server.unsubscribe() + + # Instantiate a new server object + server = cherrypy._cpserver.Server() + + # Configure the server object + server.socket_host = "0.0.0.0" + server.socket_port = 8080 + server.thread_pool = 10 + + # For SSL Support + # server.ssl_module = 'pyopenssl' + # server.ssl_certificate = 'ssl/certificate.crt' + # server.ssl_private_key = 'ssl/private.key' + # server.ssl_certificate_chain = 'ssl/bundle.crt' + + # Subscribe this server + server.subscribe() + + # Example for a 2nd server (same steps as above): + # Remember to use a different port + + # server2 = cherrypy._cpserver.Server() + + # server2.socket_host = "0.0.0.0" + # server2.socket_port = 8081 + # server2.thread_pool = 30 + # server2.subscribe() + + # Start the server engine (Option 1 *and* 2) + + cherrypy.engine.start() + cherrypy.engine.block() + diff --git a/paramecio/citoplasma/urls.py b/paramecio/citoplasma/urls.py index 014c27d..78212da 100644 --- a/paramecio/citoplasma/urls.py +++ b/paramecio/citoplasma/urls.py @@ -23,11 +23,8 @@ def make_url(path, query_args={}): """ This is a method for create urls for the system - Keyword arguments: - module -- The module where search code to execute - controller -- The controller where search code to execute - method -- The method to execute + path -- The path to the module query_args -- a ser of get variables for add to url """