0

I have a Django app which I need to distribute to other teams for testing, but I don't want to share the code. The structure of a Django project is -

  • parentfolder
    • djangoproject
    • djangoapp
    • db.sqlite3
    • manage.py

I need to password protect djangoproject and djangoapp, because running a Django app requires one to go to the above directory (parentfolder) and run manage.py.

All the options I've looked at so far either

  1. Zip the folder and password-protect it - This doesn't work, because once zipped, the Django app doesn't work, since it can't work with zipped folders.

  2. Hide the folder - This obviously doesn't work, since Django can't see them.

I'd like to protect the folders under a password, such that they still remain visible to other applications and also the user. But if the user wants to peer inside the folders, he'd have to enter a password.

6
  • There a reason you cannot simply compile the python code which is what you typically do if you want to allow people to use the python script but now allow them to modify the code? You can always obfuscation I suppose.
    – Ramhound
    Aug 17, 2017 at 14:39
  • There are tools available to decompile .pyc back to .py Aug 17, 2017 at 14:41
  • Sure but that takes extra effort but anything you do with file permissions can be reversed in an instant if they are an Administrator on their own machine. You can always change the project's programming language to one of the many choices where it is easier to protect the source code to.
    – Ramhound
    Aug 17, 2017 at 14:44
  • That's true. I am looking for some solution which doesn't involve file permissions or zipping or hiding. Something like password-protected PDFs. Aug 17, 2017 at 14:46
  • Ah... yes, it's a pretty big project by now. Rewriting it all in another language would take considerable time Aug 17, 2017 at 14:47

0

You must log in to answer this question.