def post(self, request, *args, **kwargs):
try:<EOL><INDENT>self.get_object(**kwargs)<EOL><DEDENT>except Http404:<EOL><INDENT>return Response({'<STR_LIT>': _('<STR_LIT>')}, status=<NUM_LIT>)<EOL><DEDENT>if not self.is_contactable():<EOL><INDENT>return Response({'<STR_LIT>': _('<STR_LIT>')}, status=<NUM_LIT>)<EOL><DEDENT>content_type = ContentType.objects.only('<STR_LIT:id>', '<STR_LIT>').get(model=self.content_type)<EOL>data = request.data<EOL>message = Inward()<EOL>message.content_type = content_type<EOL>message.object_id = self.recipient.id<EOL>message.message = data.get('<STR_LIT:message>')<EOL>if request.user.is_authenticated():<EOL><INDENT>message.user = request.user<EOL><DEDENT>else:<EOL><INDENT>message.from_name = data.get('<STR_LIT>')<EOL>message.from_email = data.get('<STR_LIT>')<EOL><DEDENT>message.ip = request.META.get('<STR_LIT>', '<STR_LIT>')<EOL>message.user_agent = request.META.get('<STR_LIT>', '<STR_LIT>')<EOL>message.accept_language = request.META.get('<STR_LIT>', '<STR_LIT>')<EOL>try:<EOL><INDENT>message.full_clean()<EOL><DEDENT>except ValidationError as e:<EOL><INDENT>return Response(e.message_dict, status=<NUM_LIT>)<EOL><DEDENT>message.save()<EOL>if message.status >= <NUM_LIT:1>:<EOL><INDENT>return Response({'<STR_LIT>': _('<STR_LIT>')}, status=<NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>return Response({'<STR_LIT>': _('<STR_LIT>')}, status=<NUM_LIT>)<EOL><DEDENT>
Contact node owner.