PS E:\PycharmWorkspace> django-admin.exe startproject mysite//在此路径下创建文件名为mysite
PS E:\PycharmWorkspace> django-admin.exe startproject mysite为文件中导入基本架构 PS E:\PycharmWorkspace> ^C PS E:\PycharmWorkspace> dir查看目录
目录: E:\PycharmWorkspaceMode LastWriteTime Length Name
d----- 2019/5/22 11:00 mysite d----- 2019/5/22 9:38 test d----- 2019/5/22 9:31 新建文件夹 (2)
PS E:\PycharmWorkspace> cd .\mysite///进入此文件 PS E:\PycharmWorkspace\mysite> dir
目录: E:\PycharmWorkspace\mysiteMode LastWriteTime Length Name
d----- 2019/5/22 11:00 mysite -a---- 2019/5/22 11:00 826 manage.py
PS E:\PycharmWorkspace\mysite> python .\manage.py runserver/运行此文件 Performing system checks…
System check identified no issues (0 silenced).
You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run ‘python manage.py migrate’ to apply them. May 22, 2019 - 11:03:04 Django version 1.11, using settings ‘mysite.settings’ Starting development server at http://127.0.0.1:8000///从浏览器访问文件 Quit the server with CTRL-BREAK. 浏览器http://127.0.0.1:8000/
pycharm中右键运行 错误结果 改进-> 右上角编辑结构 Script paprameters —_>runserver
在浏览器上换成汉语在设置settings 添加到setings
LANGUAGE_CODE = ‘zh-hans’
TIME_ZONE = ‘Asia/Shanghai’