Re:Things I do every time I start a Django project
by nojs on Friday June 24, 2022 @10:12AM
(#31862142)
Yeah that works pretty well too. I think there’s some minor advantages of having them in apps, they’re sorted neatly in the admin, you’re forced to split views, models, templates, admin, etc together which keeps things a bit cleaner. But it’s also messier in other ways (you have to sift through too many files to find the thing you want).
Re:Things I do every time I start a Django project
by Doxin on Monday June 27, 2022 @04:17AM
(#31891878)
Migrations that cross app boundaries are a nightmare. Before you know it there's thousands of migrations in your various apps, and squash is powerless to help you. It'll pretend to work but break your migrations if you try to squash across any migration that depends on a migration in a different app.
IMO migrations in combinations with apps are fully broken in django. it's unworkable for large projects.
The same trick of course applies to any python file you want to split up. Views, urls, managers, etc etc.