from threadedcomments.models import ThreadedComment
from django.utils.safestring import mark_safe
-from views import get_influence_comment_form, quote_reply
-
class CharacterAdmin(admin.ModelAdmin):
list_filter=('status', 'player')
search_fields=('name',)
opts = model._meta
obj = get_object_or_404(model, pk=object_id)
- comments = ThreadedComment.objects.get_tree(obj)
- # Annotate each comment with a proper reply form
- for comment in comments:
- initial = { 'comment' : quote_reply(comment) }
- comment.reply_form = get_influence_comment_form(request.user.is_staff, comment)(initial=initial)
+ comments = obj.get_comments(private=True)
context = {
'root_path' : self.admin_site.root_path,