django-admin startproject projectname
django-admin startproject myproject
python manage.py runserverpython manage.py runserver
python manage.py startapp appnamepython manage.py startapp myapp
python manage.py makemigrationspython manage.py makemigrations
python manage.py migratepython manage.py migrate
python manage.py createsuperuserpython manage.py createsuperuser
python manage.py collectstaticpython manage.py collectstatic
python manage.py testpython manage.py test
python manage.py shellpython manage.py shell
python manage.py checkpython manage.py check
manage.py
commands.# Inside your_app/management/commands/your_command.py
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = 'Description of the command'
def handle(self, *args, **options):
# Command logic
python manage.py dbshellpython manage.py dbshell
python manage.py sqlmigrate appname migrationname
python manage.py sqlmigrate myapp 0001
python manage.py loaddata fixturename
python manage.py loaddata mydata
python manage.py dumpdata appnamepython manage.py dumpdata myapp > myapp_fixture.json
Remember to replace projectname, appname, migrationname,
and
fixturename with your actual project, app, migration, and fixture
names respectively. These
commands form the backbone of your interactions with Django's manage.py utility and are essential for efficient
Django
development.