如何在最少的安装工作中部署Django项目? [英] How can Django projects be deployed with minimal installation work?

查看:71
本文介绍了如何在最少的安装工作中部署Django项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要使用Python / Django / MySQL部署站点,我必须在服务器(RedHat Linux)上执行这些操作:

To deploy a site with Python/Django/MySQL I had to do these on the server (RedHat Linux):


  • 安装MySQLPython

  • 安装ModPython

  • 安装Django(使用 python setup.py install

  • 在httpd.conf文件中添加一些指令(或使用.htaccess)

  • Install MySQLPython
  • Install ModPython
  • Install Django (using python setup.py install)
  • Add some directives on httpd.conf file (or use .htaccess)

但是,当我使用PHP部署另一个站点(使用CodeIgniter)我不得不做任何事情。在共享服务器上部署Django项目时遇到了一些问题。现在,我的问题是:

But, when I deployed another site with PHP (using CodeIgniter) I had to do nothing. I faced some problems while deploying a Django project on a shared server. Now, my questions are:


  • Django项目的部署过程是否可以轻松实现?

  • 我做得太多了吗?

  • 可以省略某些步骤吗?

  • 在共享服务器上部署django站点的最佳方法是什么?

  • Can the deployment process of Django project be made easier?
  • Am I doing too much?
  • Can some of the steps be omitted?
  • What is the best way to deploy django site on a shared server?

推荐答案

可以使django项目的部署过程更容易吗? >

Can the deployment process of django project be made easier?

不。你可以编写一些这样的东西,如果你愿意的话。但是,您永远不会再安装MySQL,MySQLPuthon,mod_wsgi(或mod_python)或Django。

No. You can script some of this, if you want. However, you're never going to install MySQL, MySQLPuthon, mod_wsgi (or mod_python), or Django again.

然而,您将一直调整应用程序。

You will, however, tweak your application all the time.

我做得太多了吗?

Python(和Django)不是Apache的一部分。 PHP嵌入在Apache中。 PHP就像mod_python(或mod_wsgi)一样。只是一块馅饼。 (显然,一些主机为您处理PHP安装,但不要处理mod_wsgi或mod_python安装。)

No. Python (and Django) are not part of Apache. PHP is embedded in Apache. PHP is exactly like mod_python (or mod_wsgi). Just one piece of the pie. (Apparently, some hosts handle the PHP installation for you, but don't handle the mod_wsgi or mod_python installation.)

可以省略一些步骤吗?

否。但是,您只能执行一次。

No. However, you only do it once.

在共享服务器上部署django站点的最佳方法是什么?

你正在做的正确。

当我使用php(使用CodeIgniter)部署另一个网站时,我不得不做任何事

当然不公平的比较。显然,他们已经为您安装了PHP和数据库。他们很好。

Certainly an unfair comparison. Apparently, they already installed PHP and the database for you. Nice of them.

此外,PHP不是Python。 PHP是Apache的插件。 Python是只是一种编程语言,需要单独的Apache插件(即mod_python或mod_wsgi)。

Also, PHP is not Python. PHP is a plug-in to Apache. Python is "just" a programming language, that requires a separate plug-in to Apache (i.e., mod_python or mod_wsgi).

请参阅与PHP相比,Python的流与HTML相比好吗?

这篇关于如何在最少的安装工作中部署Django项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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