from django.template.loader import render_to_string from django.conf import settings from django.template import Context from django.db.models import get_model from django.conf import settings from locations.models import Region,Country,Route from build.base import BuildWriting def update_recent(sender, instance, signal, *args, **kwargs): if not settings.DEVELOPMENT: if instance.status == 1: #update homepage, archives and details b = BuildWriting() b.build_homepage() b.build_archive_pages() b.build_detail_pages() #update map b = BuildMap() b.build()