In continuing to diagnose this problem I have re-read the
DJANGO_SETTINGS documentation. Under the section for Default Settings
it says:

"A Django settings file doesn't have to define any settings if it
doesn't need to. Each setting has a sensible default value. These
defaults live in the file django/conf/global_settings.py.

Here's the algorithm Django uses in compiling settings:
        * Load settings from global_settings.py.
        * Load settings from the specified settings file, overriding
the global settings as necessary."

Is it possible to adjust that algorithm to

* first load settings from the global_settings.py
* second load settings from a common project settings.py
* third load settings from a specific project's settings.py

In other words, is there a way to have another level of settings in
between global and project-level without modifying the django_src.
Thanks again.


Scott McCracken wrote:
> I have a few questions regarding a past topic which is now closed to
> comments after 30 days of inactivity:
> http://groups.google.com/group/django-users/browse_thread/thread/ca0485ca0ce4da56/4cb89ff5aa5dcb5d?lnk=gst&q=sites&rnum=1#4cb89ff5aa5dcb5d
>
> My questions revolve around trying to have multiple sites share a
> common application in a local environment running the django
> development server. Say, for example, I have a project where two sites
> are to share a common blog application. My project structure is as
> follows:
>
> project/
>     common/
>         settings.py
>         blog/
>     site1/
>         settings.py
>     site2/
>         settings.py
>
> 1) Is this a logical file structure to ensure both site1 and site2 have
> access to the common/blog application?
>
> 2) Should my common/settings.py file be placed in the global project
> directory so the other settings.py files can inherit global settings?
>
> 3) if site1 and site2 are inheriting global settings, can their
> settings.py files simply contain the variables which are different from
> common such as SITE_ID, COOKIE_NAME, SECRET_KEY and TEMPLATE_DIRS and
> still access all the global settings from common/settings.py?
>
> 4) Should common/settings.py have a SITE_ID defined even though it is
> not a "site" - rather it is a location for common apps and settings.
>
> 5) Can anyone shed some light on how to test the two sites? If i run
> "python manage.py runserver 8081" from /project/site1/ I get an
> excpetion on the site when trying to access the blog: 'No module named
> common.blog.models'
>
> Which means I'm apparently not inheriting the global settings properly.
>
> I'm sorry for the long question and my complete novice approach to all
> of this. I feel like the "django multiple site" lightbulb is just above
> my head, and i need someone to help me reach up and turn it on. Many
> thanks in advance.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to