Russell,
I am working through something similar and I think that the basic
structure would be to have project folders for each site plus a folder
for your shared applications (whose models use the 'Site' object and
'CurrentSiteManager'. Something like this:
/home/django/sharedapps/
/home/django/sharedapps/profiles
/home/django/sharedapps/accounts
/home/django/sharedapps/notification
/home/django/sharedapps/photos
/home/django/sharedapps/videos
/home/django/website1/
/home/django/website1/
/home/django/website1/settings.py
/home/django/website2/
/home/django/website2/apps
/home/django/website2/apps/uniquewebsite2app
/home/django/website2/settings.py
/home/django/multisite.db

Assuming your working django directory is '/home/django', you create a
directory named sharedapps and place the apps you want to work across
your sites there. So if you had applications like 'profiles',
'accounts', 'photos', etc. that both websites would use, place the
apps in a 'sharedapps' folder. You would need to make sure the
'sharedapp's folder was added to the environment path for each project
'website1' and 'website2'. The Pinax project basically does this by
modifying 'manage.py' and adding lines like 'sys.path.insert(0, join
(settings.PINAX_ROOT, "apps"))'. I'm thinking something like a '/home/
django/sharedsitesettings.py' might be a place to put this. And of
course you will also need to make sure the database is shared, so
perhaps you'd add database settings into that 'sharedsitesettings.py'
file. For a SQLite3 database, that could be the '/home/django/
multisite.db'

Looking at the Pinax project code has reminded me that Django is first
and foremost python, so I stopped thinking about django projects as
the base container for django...er, projects. I think what Django
calls a 'project' is a convenience for us to get started, but for
complex development, we need to remember that what Django creates is
just a directory with files in it.

Anyway, that is my take currently. Perhaps someone more knowledgeable
will come around and reveal a better way.

--~--~---------~--~----~------------~-------~--~----~
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