I am new to CherryPy coming from Django. I liked how Django split the various parts of the project into multiple files, and I would like to do the same in CherryPy, instead of having one large file.
I think it would be great if I could split the project in these parts:
- application.py: CherryPy kernel, where the server starts
- urls.py: contains all urls, possibly using RoutesDispatcher
- models.py: through SQLAlchemy containing all models
- controllers.py: Pretty obvious;)
I do not ask you to insert the full code here, the link to the / pastebin / gist example is also great :)
Thank you for your help.
python cherrypy code-organization project-organization
Cyril N.
source share