On 10 Apr 2008, at 1:48 pm, Polat Tuzla wrote:
> CSS swapping via settings file seems like good idea. Thanks for that..
> But when it comes storing messages in the database: I don't think it's
> feasible.
> By messages I mean almost all of the strings throughout the source;
> page titles, headers in templates, error messges that are added to
> user message set in views, even "verbose name"s of models.
>
> I think I'll have to use a custom template loader as mentioned above,
> but still in this case, I'll have to duplicate the templates between
> the two sites.
> Thank you all, for the suggestions.
I've done a similar thing for a site in which there are 3 sites
running from the same database. Basically using the Sites framework
and then any model you need has a field of:
site = models.ManyToManyField(Site)
That way you can choose which site(s) each item of content will
appear on.
We then have one overall settings.py file which defines the common
settings and then a settings file per site that defines the unique
parts of each site:
from settings import *
SITE_ID = 1
TEMPLATE_DIRS = (
os.path.join(PROJECT_DIR, 'templates/site1'),
)
EMAIL_SUBJECT_PREFIX = '[site1] '
Then when you run the development server for each site or deploy the
site you would pass the specific settings file rather than the common
one.
I hope that makes some sort of sense.
--
David Reynolds
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---