開立新專案(tourismdata)
django-admin.py startproject tourismdata
python manage.py migrate
資料夾結構
tourismdata/
├── manage.py
└── tourismdata
├── init.py
├── settings.py
├── urls.py
└── wsgi.py
啓動server
python manage.py runserver
新增Django app
python manage.py startapp arrival_stat
將新增的Django app加入設定檔settings.py中的INSTALLED_APPS區塊
INSTALLED_APPS = [
‘django.contrib.admin’,
‘django.contrib.auth’,
‘django.contrib.contenttypes’,
‘django.contrib.sessions’,
‘django.contrib.messages’,
‘django.contrib.staticfiles’,
‘arrival_stat’,
]