We have an app that is installed at many different sites, and these
sites do not all have the same database schema. This means that we
need to have different models at different sites. (The code itself is
not an issue as it's all introspective.) I'm looking for info on how
folks here have dealt with this.  Currently we have a models file for
each site and we install the site specific one when we do an install.
I've been looking at the sites functionality in django and thinking
about using this. If I did this is there anything cleaner then just
doing something like this:

class Foo(models.Model):
   current_site = Site.objects.get_current()
   if current_site.domain == 'baz.com':
        siteBazCol = models.CharField(max_length=512, null=True)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY7EA4-Rtj_MXGaqt64PD7zdfZ4WArw6Ag74tBdEhpGOrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to