如何将django服务器部署到没有完整源代码的生产环境中? [英] How to deploy django server into production environment without a full source code?

查看:896
本文介绍了如何将django服务器部署到没有完整源代码的生产环境中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还是Python和Django的新手。我正在使用Django开发一个应用程序,最终将转到生产服务器。它是客户端的定制Web应用程序。在进行一些研究后,我发现 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屋!

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