diff options
Diffstat (limited to 'app/blog/signals.py')
-rw-r--r-- | app/blog/signals.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/blog/signals.py b/app/blog/signals.py new file mode 100644 index 0000000..a8c0556 --- /dev/null +++ b/app/blog/signals.py @@ -0,0 +1,21 @@ +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,BuildMap + +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()
\ No newline at end of file |