On 19 oct. 2011, at 00:21, Rich Jones wrote:
> Here's some of what I propose. I'm not suggesting this be a canonical
> list of features by any means, I'm just suggesting that django have
> more convenient default settings. We should look at the most common
> conventions and best practices and shape the defaults towards them.

Hello,

Collecting static files and putting media uploads in the "project directory" 
(whatever that means) isn't really a best practice. In production, the code 
area should be read-only for the web server user: code goes in /usr/... and 
data in /var/www/...

In order to make deployment easier, I also recommend putting site-wide 
templates and templatetags in an application, and keeping TEMPLATE_DIRS empty, 
but that's a personal preference.

There are many ways to specialize settings by environment, and 
local_settings.py is only convenient for the smallest projects — as soon as two 
people work on the project, it's better to have "dev.py" / "prod.py" and to 
symlink or import * from the appropriate module.

Sorry for sounding negative, but I'm also against import pollution.

In short, I think that Django is a general purpose framework, and putting 
default values geared towards one-man projects isn't good for us in the long 
term. I prefer if newcomers have to read the appropriate page of the doc — 
discovering in the process that we have an excellent documentation — rather 
than blindly use the template loader or the static files without understanding 
it, and then complain that it breaks when they deploy to production.

Following Carl's cleanup of the PYTHONPATH mess, we considered writing a 
documentation page about project layout. It would touch many of the points 
discussed in your proposal. I think that's the best solution to the question 
discussed here: "how should I organize my (first) Django project?"

Best regards,

-- 
Aymeric Augustin.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to