X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=influences%2Fadmin.py;h=f77027ab28fadac4b6403bd76537634871da71b6;hb=3433929ea11845f9e36712b80fcbbb7aec9c219a;hp=f3e882801f67314c8420580179a4df52921337c4;hpb=33055c5f86c5c134bb19dcb8369861a501b5c2d3;p=matthijs%2Fprojects%2Fxerxes.git diff --git a/influences/admin.py b/influences/admin.py index f3e8828..f77027a 100644 --- a/influences/admin.py +++ b/influences/admin.py @@ -6,8 +6,8 @@ from xerxes.influences.models import Character, Influence from django.contrib.contenttypes import generic from threadedcomments.models import ThreadedComment from django.utils.safestring import mark_safe - -from views import get_influence_comment_form, quote_reply +from django.utils.translation import ugettext as _ +from django.utils.encoding import force_unicode class CharacterAdmin(admin.ModelAdmin): list_filter=('status', 'player') @@ -35,13 +35,10 @@ class InfluenceAdmin(admin.ModelAdmin): 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 = { + 'title' : _('Commentaar: %s') % force_unicode(obj), 'root_path' : self.admin_site.root_path, 'app_label' : self.model._meta.app_label, 'object' : obj,