Host Django with XAMPP on Windows(在 Windows 上使用 XAMPP 托管 Django)
问题描述
我可以在 Windows 上使用 XAMPP 运行 Django(Python 框架)基础站点吗?请指导我.
Can I run a Django (Python framework) base site with XAMPP on Windows? Please guide me.
推荐答案
XAMPP forwindows 包含:Apache、MySQL、PHP + PEAR、Perl、mod_php
、mod_perl
、mod_ssl
、OpenSSL、phpMyAdmin、Webalizer、Mercury Mail Transport System适用于 Win32 和 NetWare Systems v3.32、Ming、JpGraph、FileZilla FTP Server、mcrypt、eAccelerator、SQLite 和 WEB-DAV + mod_auth_mysql
.
XAMPP for windows contains: Apache, MySQL, PHP + PEAR, Perl, mod_php
, mod_perl
, mod_ssl
, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, Ming, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql
.
运行django缺少两个要求:
There are two requirements to run django missing:
- Python
mod_wsgi
所以,不,你不能单独使用 XAMPP 运行 django.您需要安装其他软件.
So, NO, you can't run django with XAMPP alone. You need to install additional software.
但是运行 django 非常容易.如果你只是想开发一个应用程序,你只需要python和django.Django 本身包含一个可用于开发的内部 Web 服务器.
However running django is very easy. If you just want to develop an application, you only need python and django. Django itself includes an internal web server that can be used for development.
如果你想在 Windows 上使用 django 作为生产服务器,你甚至不需要 apache web 服务器.你可以只安装:
If you want to use django on windows for a production server, you don't even need the apache web server. You could install just:
- Python
- cherrypy
这足以让一个好的 django 生产服务器启动并运行,因为cherrypy 的 web 服务器是用 python 编写的,并且可以很好地服务于 django(或任何其他 wsgi-兼容)应用程序.如果您没有将 apache 用于其他任何事情,我认为此设置实际上更好更容易.您可以使用其他网络服务器来代替cherrypy.但是如果你真的要使用apache,你还需要mod_wsgi
.
That's enough to have a good django production server up and running, since cherrypy's web server is written in python and is pretty good to serve django (or any other wsgi-compatible) applications. If you're not using apache for anything else I think this setup is actually better and easier. There are other webservers you could use instead of cherrypy. But if you really want to use apache, you also need mod_wsgi
.
这篇关于在 Windows 上使用 XAMPP 托管 Django的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Windows 上使用 XAMPP 托管 Django


基础教程推荐
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 包装空间模型 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 求两个直方图的卷积 2022-01-01