Hacker News new | ask | show | jobs
by leetrout 5108 days ago
I wrote a tool (along similar ideas, starting out is always a needless time sink) called GluStik (punning Paster) https://github.com/leetrout/glustik#default-djangoglu-method...

Now GluStik scratched my itch of needing a very specific, custom layout, represented in code, and plopping in Django's files (like settings) so it provides hooks to use Django's templates. I'm curious what sort of design decisions went into project builder and what plans exist to support emerging trends?

For instance, I would much rather have a settings package with base.py and local.py inside where my local settings can extend base settings (like INSTALLED_APPS += ('debugtoolbar',) ala Brack3t's Modular Settings https://github.com/brack3t/django-modular-settings

I realize this isn't the default Django behavior but I know more than a couple developers that use this format. So if project builder is about "sane defaults" and the masses prefer this is there a plan to support it (or other, similar developer centric preferences that are outside the "Django way")?

1 comments

We have included settings_local.py for development purposes, which gets imported by settings.py if it can be found. The main purpose for this is for the settings_local.py to be using sqlite3 rather than postgres, which is the default in settings.py.

Another thing which is kind of hidden is the ptm1.4 branch. This is a branch that includes a lot more, and will be growing quickly. We wanted the master branch to be generic as possible, and have it so people can easily switch out our defaults for their own, i.e. changing any of the files in django-files/ for their specific needs.

In regards to supporting other 'preferred practices', we welcome people to fork this repo and contribute stuff back. The master branch will be staying more generic, but we are all for best practices no matter if they are the "Django way".

You do see the difference between importing local settings into settings.py and importing both of them from separate modules in a package's init so they can override (per my example), yes?

I feel like you should take a harder look at the modular settings link I included. MUCH better way to solve this problem.