Here is my project folder structure:
.venv [virtual environment]
apps
budgetApp
__init__.py
settings.py
urls.py
wsgi.py
manage.py
When I run the following command python manage.py startapp budget
it creates a new folder named budget beside the folder budgetApp.
But I want to create all my apps folder inside the "apps" folder.
Django comes with six built-in apps that we can examine.
From the startapp docs: startapp <app_label> [destination] # startapp command usage. Creates a Django app directory structure for the given app name in the current directory or the given destination. If only the app name is given, the app directory will be created in the current working directory.
Your_App_Name
inside the /apps
folder.python manage.py startapp Your_App_Name ./apps/Your_Apps_Folder_Name/
Then don't forget to add just created app name in the settings.py
like below:
INSTALLED_APPS = [
...,
'apps.Your_App_Name',
]
You can also do it like this
cd apps && django-admin startapp app_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With