Django Apps
- Apps on Django are features/functionalities in the project
- Apps are defined at
settings.py
in the INSTALLED_APPS
variables
Default Apps
- By default the following apps are installed
django.contrib.admin
: admin interface to manage data
django.contrib.auth
: authenticating users
django.contrib.contenttypes
:
django.contrib.sessions
: temporary memory on the server (legacy)
django.contrib.messages
: display one time notifications to the user
django.contrib.staticfiles
: serve static files
App Modules
- Views Module (
views.py
)
- A view function takes a request and returns a response
- These are the request handler functions (or action)
- URLs Module (
urls.py
)
- Defines the endpoint path for each event handler
- This exposes a new API in the server
- The URLs from any module must be referenced in the main urls.py module