简体   繁体   中英

What is the best way to deliver django project as a full installation file (setup.exe) to be user-friendly and not revealing your whole scripts?

I have a django project which is working fine. However, this question can be related to any django project. Django works in a way that after running python manage.py runserver the project is accessible at localhost:8000 . But when you deliver the project to the customer you cannot expect them to open command windows every time, then run python manage.py runserver , then open a browser, then type localhost:8000 and etc. I have heard docker might be a solution to this. But docker will need the scripts available in the local machine. I am talking about making a full installation file like when you buy a video game and the scripts are not accessible easily (seems there are binary files).

The real question is how can we protect our code and scripts and be sure they cannot be accessed easily after we have installed them in a customer's computer?

Edit: My client is the service provider who will host the project for its own clients. That is why I am seeking to deliver the project in a way that is at least different from just copying and pasting everything.

I would suggest to create a docker image as suggested here then whoever needs to run it on local computer or as website application can freely just run a docker image locally or deploy it as docker image.

https://docs.docker.com/compose/django/

Django is webdevelopment framework. So it enables you to make web applications, not native apps (like the video games you've mentioned).

Once you feel you have a releasable product (build with django) and you would like your customers to acces your django website/application you should deploy it to a public server/host. That way your customers only need to open there browsers and go to your application.

You can do this a 100 different ways with a 1000 different setups, depending on the usage and complexity of your (web)application. To do this you need to know a little bit about system administration. There are a ton of tutorials online on how to deploy django projects.

Most important for you to learn is that you build a webapplications with Django wich can be taken in production by publishing it on the web and not by downloading some.exe file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM