Apps in Django
Apps in Django are like independent modules for different functionalities.
Creating an app
Listing app in the settings.py
After creating an app, we need to list the app name in INSTALLED_APPS
Templates in Django
Used to handle dynamic HTML files separately.
Configuring templates in settings.py
Changing the views.py file
A view is associated with every URL. This view is responsible for displaying the content from the template.
Sample template file
Migrations in Django
Migrations are Django's way of updating the database schema according to the changes that you make to your models.
Creating a migration
The below command is used to make migration (create files with information to update database) but no changes are made to the actual database.
Applying the migration
The below command is used to apply the changes to the actual database.
Admin interface in Django
Django comes with a ready-to-use admin interface.
Creating the admin user
Page Redirection
Redirection is used to redirect the user to a specific page of the application on the occurrence of an event.