def handle(self, *args, **options):
        # Every 10 minutes, refresh /+projects/
        root_logger = logging.getLogger('')
        root_logger.setLevel(logging.WARN)

        staticgenerator.quick_publish('/+projects/')
Example #2
0
def fill_people_page_cache():
    staticgenerator.quick_publish('/people/')
Example #3
0
def unpublish_blog(sender, **kwargs):
    instance = kwargs.get('instance')
    quick_delete('/blog/%i/' % instance.id)
    quick_publish('/')
#!/usr/bin/env python

from staticgenerator import quick_publish, StaticGeneratorException
from django.contrib.flatpages.models import FlatPage
from threequarters.blog.models import *

for page in FlatPage.objects.all():
    try:
        print page
        quick_publish(page)
    except StaticGeneratorException, e:
        print "BANG", e.message



for tag in Tag.objects.exclude(display__contains="fast food restaurant"):
    try:
        print tag.tag
        quick_publish(tag)
    except StaticGeneratorException, e:
        print "BANG", e.message

for post in Post.objects.all():
    try:
        print post.title
        quick_publish(post)
    except StaticGeneratorException, e:
        print "BANG", e.message

for link in Link.objects.all():
    try:
Example #5
0
#!/usr/bin/env python

import urllib2, sys, os

# determine directory automatically
directory = os.path.dirname(os.path.realpath(__file__))
parent = os.path.abspath(os.path.join(directory, os.path.pardir, os.path.pardir))
sys.path.append(parent)

import settings
from django.core.management import setup_environ

setup_environ(settings)
__builtins__.IS_SCRIPT = True

# update statistics (number of nodes and links)
from nodeshot.signals import update_statistics

update_statistics()

# clear static cache if necessary
try:
    from nodeshot.signals import clear_cache
    from staticgenerator import quick_publish

    clear_cache()
    # regenerate main pages
    quick_publish("/", "/nodes.json", "/jstree.json", "/nodes.kml", "/overview/")
except Exception, e:
    print "Error", e
 def handle(self, *args, **options):
     # Every 10 minutes, refresh /+projects/
     staticgenerator.quick_publish('/+projects/')
Example #7
0
#!/usr/bin/env python

import urllib2, sys, os

# determine directory automatically
directory = os.path.dirname(os.path.realpath(__file__))
parent = os.path.abspath(
    os.path.join(directory, os.path.pardir, os.path.pardir))
sys.path.append(parent)

import settings
from django.core.management import setup_environ
setup_environ(settings)
__builtins__.IS_SCRIPT = True

# update statistics (number of nodes and links)
from nodeshot.signals import update_statistics
update_statistics()

# clear static cache if necessary
try:
    from nodeshot.signals import clear_cache
    from staticgenerator import quick_publish
    clear_cache()
    # regenerate main pages
    quick_publish('/', '/nodes.json', '/jstree.json', '/nodes.kml',
                  '/overview/')
except Exception, e:
    print 'Error', e
    def handle(self, *args, **options):
        # Every 10 minutes, refresh /projects/
        root_logger = logging.getLogger('')
        root_logger.setLevel(logging.WARN)

        staticgenerator.quick_publish('/projects/')
Example #9
0
def refresh_project_page_cache():
    staticgenerator.quick_publish('/+projects/')