3 ms·
Just spent a week refactoring our Django projects into apps. Nice timing. The more I think about it, the less sure I am that the django-app is a good model for
by vanschelven 17y ago
Just spent a week refactoring our Django projects into apps. Nice timing.
The more I think about it, the less sure I am that the django-app is a good model for any organisation of code (not just third party reuse).
In my mind web apps consist of [parts of] pages / templates, menus, forms, and url structure and underlying models. Django forces me to separate these concerns. A Good Thing. Then it turns around and forces me to define a group (app) and lump a bunch of them together again.
- hartror 17y agoI disagree. It certainly doesn't force you to do anything. I am working with a team on a legacy web app we are converting to Django. Because of the legacy nature we have had to extend and override some of the functionality provided by Django and have found it an easy and logical process. And grouping models/forms/views/templates etc certainly has made sense for us considering the large amount of code we are dealing with. Finding the relevant section of code is a painless experience. I do agree with the articles complaint about obscure import errors. My solution when dealing with that is to drop into the shell and do the import there to get a better error message. Not ideal but so far it has been the only pain point we've had to deal with.
- rbanffy 17y ago> My solution when dealing with that is to drop into the shell and do the import there to get a better error message. What kind of software developer is afraid to (or don't know how to) do that?