|
|
|
|
|
by shashwat986
3463 days ago
|
|
I've always been curious as to how you structure your models in Django. I'm building a personal project in Tornado and MongoExpress, and the only thing I can see about structuring my models is to put all of them in one file called models.py I'm used to the RoR way of doing things, so this seems very counter-intuitive to me. In addition, whenever I try to break the classes into different files, I'm not sure of where to store my DB connection logic, and how to ensure that all models are accessible from the controllers. Ideas? |
|
Also, you shouldn't need to worry about database connection logic in Django unless you're doing something very specific.