Beginner
What is a Django app and how do you create one?
A Django app is a self-contained module that performs a specific function within a Django project. It can be reused across different projects. To create a Django app, follow these steps:
- Navigate to your Django project directory.
- Run the command
wherepython manage.py startapp app_name
app_name
is your desired app name. - This creates a new directory with the app structure (models, views, etc.).
For example, if you want to create an app called 'blog', you would run
python manage.py startapp blog
. This app can now manage blog-related functionalities.