Good idea to have a folder to keep apps together?

I was wondering, what do you think about having an apps folder to keep all apps together?

Do you have any pros and cons?


1) Have something like this (apps folder):


├── project_folder
├── manage.py
├── apps_folder
…├── app1
…├── app2
…├── app3



2) Instead of:


├── project_folder
├── manage.py
├── app1
├── app2
├── app3





Thanks!

Absolute CON.

Django has its established patterns for project organization. There are various internal and external (third-party) tools designed to work with that structure. You make changes at your own risk.

You can find multiple threads here about different ideas people have had to change this structure in their projects, and then asking for solutions to the problems created by doing so.

You’re going to be a lot better off, in general, by working with Django in the way that it expects to work, than by trying to change it to fit your desires.

Yes, there are cases where it might become very desirable to do this, but by that time, you would (hopefully) know Django well-enough to understand the implications of what you’re trying to do.

Or, as I’m fond of saying, “Don’t fight the framework.” It causes less pain that way.

1 Like

Thanks Ken.

If you don’t mind me asking, do you have an example of a typical problem that arises because of using an apps folder?

If I remember correctly, the first three that people tend to encounter when they first try this:

  • Makemigrations not detecting model changes
  • Templates not found
  • Custom management commands not found

Yes, there are solutions to all these, but really - why create extra work for yourself?

1 Like

Yes, you have to take of that.

Thanks.