Hello René,

The current built-in projet template is designed to provide the minimal set of
settings required for a functional admin and a good level of security. (A few
months ago I would have just said "a functional admin", but a new setting was
added since then.)

As far as I can tell, the main argument for including STATICFILES_DIRS is that
it would encourage developers to keep their frontend in a single place instead
of scattering it across installed applications, as shown by Emma Delescolle at
DjangoCon Europe 2015.

Considering that I included TEMPLATES['default']['DIRS'] = [] in the templates
refactor, I can hardly be against including STATICFILES_DIRS = [] as well.
(I'm the self-proclaimed guardian of the minimialistic default settings file.)

That said, in my experience, the bigger pain point has been the requirement to
set STATIC_ROOT before deploying. Has anyone else noticed that? Should we do
something about it as well?

Including one more setting in the default project template doesn't hurt much.
It's the cumulative effect that makes the default settings module long and
unwieldy. I noticed that many developers are reluctant to edit out the bits
they don't need. That's why I believe it's useful to keep it minimal.

-- 
Aymeric.



> On 7 nov. 2015, at 22:30, René Fleschenberg <[email protected]> wrote:
> 
> Hi,
> 
> It is quite common to configure TEMPLATES and STATICFILES_DIRS such that you 
> can override the templates and static files of installed apps from some 
> central location.
> 
> Maybe startproject should actually generate settings to do this by default?
> 
> STATICFILES_DIRS = (
>    os.path.join(BASE_DIR, 'static'),
> )
> 
> Or maybe:
> 
> STATICFILES_DIRS = (
>    os.path.join(BASE_DIR, 'mysite', 'static'),
> )
> 
> In my experience, this is a real pain point for beginners, and doing this 
> shouldn't hurt anyone. What do you think?
> 
> Also, do you think that templates and static files should be treated 
> differently in this regard? The docs currently suggest such a configuration 
> for static files, but not for templates. I'd argue that it's more important 
> for templates, but it cannot harm to do it for both.
> 
> -- 
> René Fleschenberg
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django developers  (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/8237964.u2MXdYcyU2%40rex.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/B159BFDA-9B56-4129-BCAD-51FD19F66DF9%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to