summaryrefslogtreecommitdiff
path: root/app/notes
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2014-06-09 09:12:36 -0400
committerluxagraf <sng@luxagraf.net>2014-06-09 09:12:36 -0400
commit09d1f8a5aa94bc56ac50a1162360ceae56c38dd0 (patch)
treec339e9b457e490a2fd01a21581243d6c7128f87a /app/notes
parent0fe4e6faf9d5454d810e6fa97450107b0dcfd5cd (diff)
notes now build when saved
Diffstat (limited to 'app/notes')
-rw-r--r--app/notes/build.py3
-rw-r--r--app/notes/models.py5
2 files changed, 4 insertions, 4 deletions
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):