News for hackers. Stuff that matters.
Re:Things I do every time I start a Django project by awongh on Friday June 24, 2022 @02:30AM (#31858402)
One thing I never figured out was dependency management. Some others are linking to two scoops of django and other starter templates, it seems like none of them get past a kludgy set or requirements.txt files. I want something easy to use like ruby bundler or npm. I want to be able to specify my dependencies and install them in one command, and specify if something is production or local in that same command.
Re:Things I do every time I start a Django project by h3ctic on Friday June 24, 2022 @02:41AM (#31858466)
Have you tried Poetry? (https://python-poetry.org)
Re:Things I do every time I start a Django project by mrweasel on Friday June 24, 2022 @02:48AM (#31858501)
Out of curiosity, and because I rather prefer pip and the requirements.txt file over npm or anything Ruby has to offer, what issues do you encounter with dependency management in Django/Python.

Granted, trying to build your own reusable modules for Django is not a great experience. In these cases the tools feels rather restrictive.

Re:Things I do every time I start a Django project by Gordonjcp on Friday June 24, 2022 @02:48AM (#31858504)
> I want to be able to specify my dependencies and install them in one command

"pip install -r requirements.txt"

If you have different requirements, you can use a different file.

Obviously this is only for development, and if you package your Python code properly then you can install the whole damn thing as a package.

Re:Things I do every time I start a Django project by lmns on Friday June 24, 2022 @05:13AM (#31859379)
I use pip-tools with venvs for that and can‘t complain. It pins dependencies and you can create different requirements.txts for local dev and production (production for me is usually dev minus some debugging tools). It‘s not particularly fancy, but it gets the job done.
Re:Things I do every time I start a Django project by Arcanum-XIII on Friday June 24, 2022 @02:43AM (#31858475)
And a way to manage the update of them… currently doing this blindly, running the test suite after each updated package hoping nothings broken.

Slow and frustration prone with “sorry this package require packagex version 1 but packagew require it to be 2 now”