It hurts new people a crazy amount that this isn’t recommended clearly in the docs. I have sometimes stood by to see what happens when a few people on the Official Discord tries to get nginx configured for static. It often leads to hours wasted.
We are letting perfect be the enemy of good. Just recommend whitenoise as step one.
The current feature is too simple. It’s inadequate for me.
I often develop the feature that includes role and permission.
That specification is complex, then I think to need a new framework.
It’s like django-role-permissions.
A more “monolithic” runserver command / docker image, that does all required startup tasks automatically and in the background (running migrations, collecting staticfiles, etc)
A blessed integration with frontend build processes
Organization of management commands
Recommended app structure, i.e. where does your business logic live?
On the ops side, I’m not sure if it would be part of core, but I would expect a good story for:
I agree with and second almost all of the mentioned above, plus
template components
task queues based on db
Having official tooling/recommendations for development like templates formatter, docker wrapper, editors extensions (vim &vs code) and front-end task runner.
more illustrative error messages (templates not found, db columns not found when migration is needed, etc) and links to the docs
In general, Django should learn more from Laravel and maybe Rails regarding DX
A clear build step for static assets that can be hooked into with custom code. It doesn’t need to do anything by default, but there should be one obvious place to run esbuild or whatever. Right now, I’m running build steps outside of Django’s framework, but I would prefer it if Django knew to call the build step in the right places. A lot of the Django extensions are too opinionated when it comes to compiling static assets, all I want is a hook for a build step and I’ll write its code myself. (If this feature already exists, I’ve somehow failed to discover it.)
I would love more strict Django templates that don’t silently fail when variables are missing or when there are typos in variable names
Anything to make first-time deployments easier
I also heartily agree with some of these other suggestions, including: whitenoise by default and background tasks.
Yes, true. Sooo many even quite experienced Django devs I know are unaware of many third-party packages that are de-facto part of core. For example, a dev I know who has been using Django for a year but has 20+ years of experience at the highest level, didn’t know about django-debug-toolbar until I told him about it at lunch. And he was like, I’ve trying to figure out how to do that!
A long way of saying, helping with discovery/marketing is key.
This post was inspired by some chat on Mastodon and a blog post or two.
100% this! I think is this my goal. The goal is not to add most of them to core, but to identify existing packages or gaps for new ones, then highlight or ‘bless’ those in the docs at the appropriate points.
The two things that projects I work on always seem to need are per-environment configuration settings (e.g. production vs staging vs development/testing) and feature flags. Not hard to implement but they definitely feel like batteries to include.