title: Django: TemplateDoesNotExist (rest_framework/api.html)
body: <p>In my view function, I'd like to return a json object (data1) and some text/html (form). Is this possible?</p>
  
  <p>MY code</p>
  
  <pre><code>@api_view(['POST'])
  @permission_classes((AllowAny,))
  def create_user(request):
      if request.is_ajax():
          if request.method == 'POST':
              serializer = SignupSerializer(data=request.data)
              print 'ser'
              print serializer
              if not serializer.is_valid():
                  return Response(serializer.errors,\
                                  status=status.HTTP_400_BAD_REQUEST)
              else:
                  serializer.save()
                  data={'status': 'Created','message': 'Verification email has been sent to your email. Please verify your account.'}
                  return Response(data, template_name='register.html')
      else:
          return HttpResponse('hello world')
  </code></pre>
  
  <p>When I call the url I get status code 500 with error as displayed below</p>
  
  <blockquote>
    <p>TemplateDoesNotExist rest_framework/api.html</p>
  </blockquote>
  
  <p>when I check as a API, I get response with 200 ok status. This shows Im unable to get my html page</p>
  
  <p>How should I get my html depending on request</p>
  
  <p>Thanks in advance</p>