What are some best practices for structuring cherrypy apps?

Posted by Omega on Stack Overflow See other posts from Stack Overflow or by Omega
Published on 2010-04-18T17:38:38Z Indexed on 2010/04/18 17:43 UTC
Read the original article Hit count: 366

I'm writing a cherrypy app and I was wondering what the best way is for structuring my handlers and code for larger applications?

I realize assignment is simple trough cherrypy.root, but what are some practices for writing the handlers and assigning them?

(Allow me to prove my confusion!) My initial thought is to write a standard handler class that infers a template to run based on the current URL or class/method combination. Then I would assign one instance of that handler multiple times to the path to create pages. I don't see this working however as the recursive references wouldn't work quite right.

So, given the fact that I'm already drawing blanks on how my own source code should look, I'd love some pointers and examples!

Feel free to ask some detailed questions for me to clarify. While there is plenty of cherrypy tutorial material out there, it tends to only scratch the surface.

© Stack Overflow or respective owner

Related posts about cherrypy

Related posts about python