Skip to content

Instantly share code, notes, and snippets.

@LD8
Created December 25, 2019 08:32
Show Gist options
  • Save LD8/8b5dfdf6b4cef001767a7939303d08f1 to your computer and use it in GitHub Desktop.
Save LD8/8b5dfdf6b4cef001767a7939303d08f1 to your computer and use it in GitHub Desktop.
Django setup command
$ python3 -m venv venv

$ source venv/bin/activate

(venv)$ pip install django
# OR for some Chinese users to install faster $ pip install django -i https://pypi.douban.com/simple

(venv)$ django-admin startproject <project_name> .
# DO NOT forget to type the dot at the end!!!

(venv)$ python manage.py startapp <app_name>

(venv)$ python manage.py makemigrations

(venv)$ python manage.py migrate

(venv)$ python manage.py runserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment