Move comments and tags manager statements to their respective apps

This commit is contained in:
Roberto Rosario
2011-12-31 00:22:20 -04:00
parent c0fbec0f8e
commit 3705007330
3 changed files with 13 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.contrib.comments.models import Comment
from django.contrib.contenttypes import generic
from navigation.api import register_links, \
register_model_list_columns
@@ -47,3 +48,12 @@ register_links(['comments_for_object', 'comment_add', 'comment_delete', 'comment
register_links(Comment, [comment_delete])
register_links(Document, [comments_for_object], menu_name='form_header')
Document.add_to_class(
'comments',
generic.GenericRelation(
Comment,
content_type_field='content_type',
object_id_field='object_pk'
)
)