I'm using a mongodb database backend with tornado as my core. I currently just have my main file with a bunch of handlers in it. It's a multiuser webapp with links between users, aka a "friend" system.
My current structure is:
templates/
static/
main.py (contains all handlers)
user_actions.py
auth_actions.py
.
.
.
bar_actions.py
Most of the handlers correspond to actions file. For example a friend request handler corresponds to function in user_actions.py that accepts the database and userids as parameters. I feel like this isn't the best layout for such a large project. Should I have some type of models file containing models of the current user or is this just excess. I'm currently storing the current user as a dictionary, in a cookie.