summaryrefslogtreecommitdiff
path: root/apps/blog/signals.py
blob: a8c0556673b65e14fbcdafee95320240f8575554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()