-
Activate virtual env.
-
Install django.
$ pip install --upgrade pip
$ pip install django
- Create project.
Don't forget . at the end!!
$ mkdir tutorial
$ cd tutorial
$ django-admin startproject tutorial .
$ tree
.
├── manage.py
└── tutorial
├── __init__.py
├── settings.py
├── urls.py
└── wsgi.py
- Create application
$ ./manage.py startapp community
$ tree
.
├── community
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ └── __init__.py
│ ├── models.py
│ ├── tests.py
│ └── views.py
├── manage.py
└── tutorial
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-35.pyc
│ └── settings.cpython-35.pyc
├── settings.py
├── urls.py
└── wsgi.py
- Create Database Table
$ ./manage.py migrate
- Create Superuser
$ ./manage.py createsuperuser
- Run Server
$ ./manage.py runserver