-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Applications Folder #3594
Comments
Isn't it already under one sub folder called the "project_slug"? |
There are static, templates, utils alongside users in one folder its better to move users and others applications in a subfolder called apps in this directory |
The current layout of the project has been working well for the last 7-8 years. I don't remember any previous questioning of the current project layout. |
@smrf1093 would you find it less confusing if folders for non-apps were outside of the - from project_slug.users.forms import ...
+ from project_slug.apps.users.forms import ... Although on a second thought, I would like to leave the
|
@browniebroke I nearly agree with your suggestion at least we know all the apps are placed inside the project_slug folder and this scope is restricted to the Django project applications. about the lengthy imports, I do not completely agree with you because just adding 4 characters to the imports does not make them lengthy besides it adds meaning to it for example when you write project_slug.apps.devices it means that the devices package contains a Django application |
Granted, it's not many characters on a single line, but it would be repeated many times, for nearly all internal imports of the project. I think that cost is not worth it as I see no benefit (at least so far). |
These implementations are more like user preferences, you don't need to wait for them. I have been using it for years. All of my apps (just my apps) are in an "apps" (or similar name) folder. I mostly use relative imports between apps, so I don't see the "apps." in my imports at all. |
Yes, I know it is a user preference. However, many of the cookie-cutter structures can be changed based on user preferences, but the purpose of it is to present a good starting structure. So, based on the purpose it is better to have this feature included. |
Related to #4031 |
Description
Move all the application folders into a subfolder named apps
Rationale
It is more logical to have all Django applications in one subfolder, here is a StackOverflow discussion which suggests this
https://stackoverflow.com/questions/22841764/best-practice-for-django-project-working-directory-structure
The text was updated successfully, but these errors were encountered: