Django学习笔记 Django的工程目录
2016-04-07 20:25
686 查看
mysite
├── manage.py 管理项目:包括数据库建立、服务器运行、测试……
└── mysite
├── __init__.py
├── settings.py 配置文件:应用、中间件、数据库、静态目录各种配置……
├── urls.py URL映射配置文件L决定一个url访问被哪个程序(函数)响应
└── wsgi.py Python应用程序或框架和Web服务器之间接口
运行python manage.py可以看到其后可以跟的一些命令:
wsgi.py
django起的是一个轻量级的调试服务器,真正做到产品的时候是用的大型的服务器。
django和大型服务器之间的接口是通过wsgi来配置的。
├── manage.py 管理项目:包括数据库建立、服务器运行、测试……
└── mysite
├── __init__.py
├── settings.py 配置文件:应用、中间件、数据库、静态目录各种配置……
├── urls.py URL映射配置文件L决定一个url访问被哪个程序(函数)响应
└── wsgi.py Python应用程序或框架和Web服务器之间接口
运行python manage.py可以看到其后可以跟的一些命令:
""" WSGI config for mysite project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") application = get_wsgi_application()
wsgi.py
django起的是一个轻量级的调试服务器,真正做到产品的时候是用的大型的服务器。
django和大型服务器之间的接口是通过wsgi来配置的。
相关文章推荐
- 分享一个写python特别好的个人的博客
- Feather R语言和Python交互式硬盘存储格式
- 简单Python3爬虫程序(1)简单架构:队列、集合、正则
- Python的getattr(),setattr(),delattr(),hasattr()
- Django学习笔记 开发环境搭建
- python reduce函数
- CNKI小爬虫(Python)
- ubuntu下Eclipse创建Django项目
- PyQt QString转成python stirng
- python fabric实现远程操作和部署
- 代码迁移攻略:在Java工程中调用Python代码
- Python xrange与range
- python-摩尔斯电码查询器
- python GUI学习——Tkinter
- python 学习笔记十二 html基础(进阶篇)
- Implementing a Neural Network from Scratch in Python – An Introduction
- python学习5
- 常见的python错误类型和继承关系
- Leetcode 23. Merge k Sorted Lists(python)
- A Byte of Python 笔记(12)python 标准库:sys、os,更多内容