palewire/django-bakery

Supply other variables via command line

ClaudiuCreanga opened this issue · 4 comments

My workflow implies that I receive the database from other systems. So another system will run:
python manage.py build --build-dir folder but it will also have to specify the path of the database it wants to use.

At the moment I'm using argparse and another file that the system can run with the -input flag for the database path. It writes that input path into a file that then it is read by django.

Preferably I would like to have an argument in the build command where users can insert something specific for their application (like in my case the path to the db):

python manage.py build --build-dir folder --other-var path-df.sqlite

Are you interested in a PR like that?

@palewire thanks. I didn't know that I can pass a --settings flag to the build command. With that and an environment variable all works fine.

Glad to hear it. I'm curious. What are you using bakery for?

Delivering clinical dna & rna reports. Clients run a cloud app and some may also want a static html file at the end that they can download. Awesome project btw.