From 09d1f8a5aa94bc56ac50a1162360ceae56c38dd0 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 9 Jun 2014 09:12:36 -0400 Subject: notes now build when saved --- app/notes/build.py | 3 +-- app/notes/models.py | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/notes') diff --git a/app/notes/build.py b/app/notes/build.py index 44226f9..fa5dd1d 100644 --- a/app/notes/build.py +++ b/app/notes/build.py @@ -1,5 +1,4 @@ from builder.base import * -from .models import Note class BuildNotes(Build): @@ -10,7 +9,7 @@ class BuildNotes(Build): self.build_detail_pages() def queryset(self): - return Note.objects.all() + return self.get_model().objects.all() def get_model(self): return get_model('notes', 'note') diff --git a/app/notes/models.py b/app/notes/models.py index 00b9e33..40323b1 100644 --- a/app/notes/models.py +++ b/app/notes/models.py @@ -16,7 +16,7 @@ from django.dispatch import receiver from django.conf import settings import requests from locations.models import Location - +from .build import * from twython import Twython # http://freewisdom.org/projects/python-markdown/ import markdown @@ -123,7 +123,8 @@ def post_save_events(sender, instance, **kwargs): post_save.disconnect(post_save_events, sender=Note) instance.save() post_save.connect(post_save_events, sender=Note) - sender.build() + b = BuildNotes() + b.build() def write_note(sender, instance, **kwargs): -- cgit v1.2.3-70-g09d2