Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (10 sloc) 523 Bytes
from django.contrib.comments.views.comments import post_comment
def validate_and_submit(request, next=None):
# The next three lines are slightly hackish but there's not
# much that can be done if we have to pass the ip
# address to recaptcha
ip_address = request.META.get('HTTP_X_FORWARDED_FOR', request.META.get('REMOTE_ADDR', None))
post_querydict = request.POST.copy()
post_querydict.update({'remoteip': ip_address})
request.POST = post_querydict
return post_comment(request, next=next)
Something went wrong with that request. Please try again.