Skip to content

Instantly share code, notes, and snippets.

@johndhancock
Last active May 25, 2017 21:05
Show Gist options
  • Save johndhancock/d6e8709d35f4eb5197e52d3847b96937 to your computer and use it in GitHub Desktop.
Save johndhancock/d6e8709d35f4eb5197e52d3847b96937 to your computer and use it in GitHub Desktop.
django commands

In project directory command line where website is to be created ...

STARTING PROJECT

django-admin startproject <website_name>


In created project command line ...

RUN SERVER

python manage.py runserver

CREATING APP

python manage.py startapp <appname>

RUNNING MIGRATIONS

python manage.py migrate

MIGRATING CHANGES TO THE DATABASE

python manage.py makemigrations <<model name>>

RUNNING THE DJANGO DATABASE API

python mange.py shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment