About Lesson
Creating a Django App
- Inside your Django project directory, create an app using the
startapp
command:
- Inside your Django project directory, create an app using the
python manage.py startapp myapp
- This creates the following structure:
myapp/
migrations/
__init__.py
admin.py
apps.py
models.py
tests.py
views.py
Registering the App
- Add the new app to the
INSTALLED_APPS
list insettings.py
:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
# other apps...
'myapp',
]