Skip to content

Commit

Permalink
Merge pull request #4 from pbs/LUN-368
Browse files Browse the repository at this point in the history
LUN-368 - fix loader
  • Loading branch information
mcojocaru committed Jan 29, 2013
2 parents 5cd8729 + eafcbec commit 04fa1cd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cms_templates/loader.py
@@ -0,0 +1,10 @@
from dbtemplates.loader import Loader
from settings import shared_sites
from django.contrib.sites.models import Site

class CmsTemplatesLoader(Loader):

def load_and_store_template(self, template_name, cache_key, site, **params):
site_ids = [s.id for s in Site.objects.filter(name__in=shared_sites)] + [site.id]
return super(CmsTemplatesLoader, self).load_and_store_template(
template_name, cache_key, site, sites__in=site_ids)

0 comments on commit 04fa1cd

Please sign in to comment.