創造專案名稱為myproject
django-admin startproject myproject
新增專案後,資料夾裡會有以下五個py檔
# treat django file as a python package
__init__.py
# configuration
settings.py
# routes
urls.py
# for deploying production
wsgi.py
# include all the django commands as build the web app
manage.py
使用runserver來啟動server,預設URL http://127.0.0.1:8000/
python manage.py runserver
沒有留言:
張貼留言