在windows上用xampp运行django [英] run django with xampp on windows

查看:894
本文介绍了在windows上用xampp运行django的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在windows上使用xampp运行django(Python框架)站点吗?
请指导我。

解决方案

XAMPP 的Windows包含:Apache,MySQL,PHP + PEAR,Perl, mod_php mod_perl mod_ssl ,OpenSSL,phpMyAdmin,Webalizer,Win32和NetWare系统的Mercury Mail传输系统v3.32,Ming,JpGraph,FileZilla FTP服务器,mcrypt,eAccelerator,SQLite和WEB-DAV + mod_auth_mysql



运行django有两个缺点:





所以,,您无法单独使用XAMPP运行django。您需要安装其他软件。



但是运行django非常简单。如果你只想开发一个应用程序,你只需要python和django。 Django本身包括一个可以用于开发的内部Web服务器。



如果要在Windows上使用django作为生产服务器,您甚至不需要apache网络服务器。您可以安装:





这是足够让一个好的django生产服务器启动并运行,因为cherrypy的Web服务器是用python编写的,并且很好的服务于django(或任何其他 wsgi -compatible)应用程序。如果您没有使用任何其他API,我认为这个设置实际上是更好和更容易。还有其他可以使用的网络服务器,而不是cherrypy。但是,如果你真的想使用apache,你还需要 mod_wsgi


can i run django (Python framework) site with xampp on windows? Please guide me.

解决方案

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.

There are two requirements to run django missing:

So, NO, you can't run django with XAMPP alone. You need to install additional software.

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.

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:

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天全站免登陆