What are some best practices for structuring cherrypy apps?
- by Omega
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.