在Windows上使用XAMPP托管Django [英] Host Django with XAMPP on Windows

查看:123
本文介绍了在Windows上使用XAMPP托管Django的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在Windows上使用XAMPP运行Django(Python框架)Django基础站点吗?
请指导我。

Can I run a Django (Python framework) base site with XAMPP on Windows? Please guide me.

推荐答案

XAMPP 包含:Apache,MySQL,PHP + PEAR,Perl, mod_php mod_perl mod_ssl ,OpenSSL,phpMyAdmin,Webalizer,用于Win32和NetWare Systems v3.32的Mercury邮件传输系统,Ming,JpGraph,FileZilla FTP服务器,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:

所以,,您不能仅使用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网络服务器。您可以只安装:

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的网络服务器是用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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆