Thursday, December 30, 2010

Re: De-coupling from project

On Dec 30, 2010, at 8:50 AM, eblume wrote:
> Is there a way to specify settings like STATIC_URL or FIXTURES_DIRS
> per-application rather than per-site? Even better - is there a
> mechanism to use a file in the application rather than in
> the site?

I think that your overall goal is quite admirable, but this may be an optimization too far. One way to think of the way Django organizes its code is that a project is the platform on which applications are deployed. The role of (and the top-level is to configure the applications for a particular deployment, so things like STATIC_URL that are specific to a particular deployment of the app should not be in the app itself.

Thus, the top-level should include stuff that is:

1. General across all applications, or,
2. Used to configure a particular application for a particular deployment.

All that being said, it's no big deal to emulate the include facility in; just include your app-specific settings. You can also have a '' (or whatever) file within the application that only that app imports.

-- Christophe Pettus

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment