I'm trying to get multiple sites to play nice side by side. It makes
sense to me to have a base_settings.py file or something of the sort
that defines sensible defaults for all the sites I'll be working with
(they'll all share the same database and e-mail settings, for
example). Then each of the sites has their own settings file like
mysite1_settings.py which only needs to define the settings that are
unique to it, something like this:

from myproject.settings.base_settings import *
SITE_ID = 1
ROOT_URLCONF = 'myproject.urls.mysite1_urls'
TEMPLATE_DIRS = ( ...... )

So we'd have a directory structure for settings that goes something
like this:

myproject/
     settings/
          __init__.py
          base_settings.py
          mysite1_settings.py
          mysite2_settings.py

The problem is, I can't seem to get it to work. When I try "django-
admin.py runserver" I get an error:

Error: Could not import settings
'myproject.settings.mysite1_settings' (Is it on sys.path? Does it have
syntax errors?): No module named settings.base_settings

Seems like it's reading mysite1_settings fine, but it can't import
base_settings for some reason. If anyone can explain for me why this
isn't working, I'd be very grateful. Thanks!


--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to