Falldog / pyconcrete

Protect your python script, encrypt it as .pye and decrypt when import it
Apache License 2.0
692 stars 149 forks source link

Error opening pye-protected models.py and migrations/* files #104

Closed sfcl closed 10 months ago

sfcl commented 1 year ago

If you encrypt the py files of a Django project by running the command

pyconcrete-admin.py compile \
        --source=/code/ \
        --pye \
        --remove-py \
        --remove-pyc \
        -i wsgi.py manage.py

then the python manage.py migrate command does not see the migration files and files with database models. How to protect an entire Django project?

Falldog commented 1 year ago

ref: https://github.com/Falldog/pyconcrete#partial-encrypted-pyconcrete-as-lib You need to modify your entrypoint file manage.py, it need to import pyconcrete at the beginning. and the migration will get working