Hacker News new | ask | show | jobs
by roam 5247 days ago
I... don't understand your problem. Is it a PITA to split settings files every single time you start a new project? Yes, sure. Does it take more than five minutes to do so? No.

Really, Flask's config options are better, but they aren't that different from Django. Use the default settings, tell Django which settings to use from the commandline or specify an environment variable pointing at the settings to use. Where you put those settings is completely up to you - nobody's saying they absolutely positively must be part of your repo.

When you're working with multiple environments you'll have to specify which configuration to use one way or another so I'd prefer it to use the least amount of abstraction.

1 comments

If you, me and anyone who's spent more than a few hours with Django split settings.py into multiple files (and heavily modify it), why is it still shipped as one monolithic file? Isn't the framework supposed to make our lives easier?

Splitting settings into multiple files is the least of my problems (nowadays it is not a problem at all).

The biggest problem I have with it is that it is global, which means I cannot safely modify it at runtime.

Why would you want to modify settings at runtime? Not that I'm saying there's no good reason to, I just don't know.