I’ve been using Django for a long time, but have never needed to package a reusable app before. Is the official documentation on this fully up to date, or are there any real-world caveats I should know about?
If it matters, it’s an app that adds a management command that configures a project for deployment. It focuses on Heroku at the moment, but could be expanded to target other platforms as well.
I have never public a Django package, most of the time my projects doesn’t have enough test coverage in order to be consider a quality package, so I am not nearly expert in that subject.
That said I have learn a lot for high quality reusable packages. The Jazz Band repositories are a great start, and if you look for reusable apps and study their code you will have a very good examples.
It’s pretty up to date. But it doesn’t cover many of the smaller things you might want to add to help package development, such as testing against multiple python/django versions.
Also don’t go with its recommendation to call your module e.g.
polls whilst your package is
django-polls. Call your module
django_polls. There have been too many module collisions in packages in the past.
For the tools I use, check out the repos for the packages I maintain from my projects page, for a simple example see django-htmx. All my projects are consistent and up to date, whilst Jazzband is a bit more variable.
Thanks, this is really helpful. Most of my work has been for projects that few other developers will look at, and it’s helpful to see a set of projects that are well-organized and consistent.