From: Matthijs Kooijman Date: Fri, 14 Nov 2008 13:29:11 +0000 (+0100) Subject: Allow posting new coments in the admin. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fxerxes.git;a=commitdiff_plain;h=e330eecd9d249ded67a014e2ec5bcac11201c52a Allow posting new coments in the admin. This sets comment_form in the context so new comments can be posted in addition to replies. --- diff --git a/influences/admin.py b/influences/admin.py index 126cd5c..3b48f93 100644 --- a/influences/admin.py +++ b/influences/admin.py @@ -8,6 +8,7 @@ from threadedcomments.models import ThreadedComment from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django.utils.encoding import force_unicode +from forms import get_influence_comment_form class CharacterAdmin(admin.ModelAdmin): list_filter=('status', 'player') @@ -45,6 +46,7 @@ class InfluenceAdmin(admin.ModelAdmin): 'object' : obj, 'opts' : opts, 'comments' : comments, + 'comment_form' : get_influence_comment_form(request.user.is_staff, None)(), 'media' : mark_safe(self.media), } return render_to_response('admin/influences/influence/comments.html', context, RequestContext(request))