如何将django服务器部署到没有完整源代码的生产环境中? [英] How to deploy django server into production environment without a full source code?
问题描述
Apache与mod_wsgi
是 Django
部署的最佳选择。我只需要将代码复制并粘贴到生产服务器中,并且可以访问该应用程序。但是,如果我不想给整个源代码,只给可执行的应用程序给客户端(客户端希望将应用程序部署到自己的服务器)
。在 Python / Django
中有这样的可能吗? 您只能给他们与您的源代码文件对应的.pyc文件。这将使它们稍微更难看看你的源代码。但是,这是一个非常有限的措施(即他们仍然可以从源代码恢复一些结构),这可能是一个坏主意。
I am still a newbie to Python and Django. I am developing a application using Django which will eventually go to the production server. It's a customized web application for the client. After doing some research, I found out Apache with mod_wsgi
is the best option for Django
deployment. I just have to copy and paste the code into the production server and the application is accessible. But what if I don't want to give the whole source code and give only the executable application to the client(P.S client wants to deploy the application to their own server)
. Is something like this possible in Python/Django
?
You could only give them the .pyc files corresponding to your source code files. That will make it slightly harder for them to look at your source code. However, it's a very limited measure (i.e. they can still recover some of the structure from your source code), and it's probably a bad idea.
这篇关于如何将django服务器部署到没有完整源代码的生产环境中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!