How can Django projects be deployed with minimal installation work?

前端 未结 7 1668
花落未央
花落未央 2021-02-02 04:39

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

  • Install MySQLPython
  • Install ModPython
  • Install Django (u
7条回答
  •  旧时难觅i
    2021-02-02 05:25

    Can the deployment process of django project be made easier?

    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.

    Am I doing too much?

    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.)

    Can some of the steps be omitted?

    No. However, you only do it once.

    What is the best way to deploy django site on a shared server?

    You're doing it correctly.

    When I deployed another site with php (using CodeIgniter) I had to do nothing

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

    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).

    See How nicely does Python 'flow' with HTML as compared to PHP?

提交回复
热议问题