In this video we'll see how easy it is to create custom commands in Django.
It can be tiring to type "python manage.py makemigrations" then "python manage.py migrate" then "python manage.py runserver". The good news is we can just combine those commands in one command quickly and easily which can end up saving us so much time especially when working with projects where we have to repeatedly make and run migrations.
Important: combining management commands with 'runserver' could lead to unexpected results and should never be used in a production environment.
00:00 - About Custom Commands
00:39 - How to Create Custom Commands
01:56 - Import Base Command Class
02:15 - Override Handle Method to call "makemigrations", "migrate" and "runserver"
#django
#tutorial
#python
#webdevelopment
#codingtutorial
コメント