django1-创建并启动django工程

使用pycharm创建django工程

项目目录结构

 manage.py
 django1---工程主文件夹
        __init__.py
        settings.py
        urls.py
        wsgi.py
  templates  --模板文件夹

-manage.py 项目管理器 工具集 在pycharm面板的下方找到terminal 执行 python manage.py 查看

Available subcommands:

[auth]
    changepassword
    createsuperuser

[contenttypes]
    remove_stale_contenttypes

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    makemessages
    makemigrations
    migrate
    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver

[sessions]
    clearsessions

[staticfiles]
    collectstatic
    findstatic
    runserver

启动工程
/Users/cx/.conda/envs/django1/bin/python manage.py runserver 8080

-wsgi.py WSGI (Python Web Server Gateway Interface)(python服务器网关接口) python应用于web服务器之间的接口,
项目与外界交互的关键 不会用到不要动 不要管它
-urls.py 路由配置文件
-settings.py 核心配置文件

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容