summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/blog/models.py2
-rw-r--r--app/notes/admin.py1
-rw-r--r--app/notes/build.py3
3 files changed, 4 insertions, 2 deletions
diff --git a/app/blog/models.py b/app/blog/models.py
index 03fb306..ed0bb40 100644
--- a/app/blog/models.py
+++ b/app/blog/models.py
@@ -205,7 +205,7 @@ import shutil
from django_gravatar.helpers import get_gravatar_url, has_gravatar, get_gravatar_profile_url, calculate_gravatar_hash
from django.dispatch import receiver
from django_comments.signals import comment_was_posted
-from django_comments import Comment
+from django_comments.models import Comment
from django_comments.moderation import CommentModerator, moderator
class EntryModerator(CommentModerator):
diff --git a/app/notes/admin.py b/app/notes/admin.py
index ad3e84b..794e882 100644
--- a/app/notes/admin.py
+++ b/app/notes/admin.py
@@ -16,6 +16,7 @@ class NoteAdmin(OSMGeoAdmin):
form = NoteModelForm
list_display = ('slug', 'date_created', 'location', 'twitter_id')
list_filter = ('location',)
+ prepopulated_fields = {"slug": ('title',)}
fieldsets = (
('Note', {
'fields': (
diff --git a/app/notes/build.py b/app/notes/build.py
index 4923baf..96c4812 100644
--- a/app/notes/build.py
+++ b/app/notes/build.py
@@ -1,4 +1,5 @@
from builder.base import *
+from django.apps import apps
class BuildNotes(Build):
@@ -12,7 +13,7 @@ class BuildNotes(Build):
return self.get_model().objects.all().order_by('-date_created')
def get_model(self):
- return get_model('notes', 'note')
+ return apps.get_model('notes', 'note')
def build_detail_pages(self):
'''