How can Django projects be deployed with minimal installation work?

前端 未结 7 1805
花落未央
花落未央 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条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-02 05:13

    You can use Python virtualenv and pip (see also "Tools of the Modern Python Hacker: Virtualenv, Fabric and Pip"). I developed my Django project in the virtual environment. I copy the virtual environment file to the production machine when I deploy my application. I use mod_wsgi. You must write that in the mod_wsig file:

    import site  
    site.addsitedir('C:\PythonVirtualEnv\IntegralEnv\Lib\site-packages') 
    

提交回复
热议问题