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
基础教程推荐
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
