title: Getting Bad Request on seemily valid Django Rest Framework Post request asking for FK in Serializer data
body: <p>I am creating a new <code>SearchNeighborhood</code> object and connecting it to a already create <code>SearchCity</code> object in a <code>POST</code> request.</p>
  
  <p>I have the following models</p>
  
  <pre><code>class SearchCity(models.Model):
      city = models.CharField(max_length=200)
  
  class SearchNeighborhood(models.Model):
      city = models.ForeignKey(SearchCity, on_delete=models.CASCADE)
      neighborhood = models.CharField(max_length=200)
  </code></pre>
  
  <p>my relevant serializer is: </p>
  
  <pre><code>class SearchNeighborhoodSerializer(serializers.ModelSerializer):
      class Meta:
          model = SearchNeighborhood
          fields = ('pk', 'neighborhood')
  </code></pre>
  
  <p>my view and relevant method is: </p>
  
  <pre><code>class CityNeighborhoodsListCreate(APIView):
   def post(self, request, *args, **kwargs):
          citypk = kwargs.get('citypk', None)
          city=get_object_or_404(SearchCity,pk=citypk)
          serialized = SearchNeighborhoodSerializer(data=request.data)
          if serialized.is_valid(raise_exception=True):
              validatedData = serialized.validated_data
              neighborhood = validatedData.get('neighborhood')
              neighborhoodobject = SearchNeighborhood(neighborhood= neighborhood, city = city)
              neighborhoodobject.save()
              createdneighborhood = SearchNeighborhoodSerializer(neighborhoodobject)
              return Response({
                  'neighborhood': createdneighborhood.data
              })
  </code></pre>
  
  <p>I am using Angular 4 </p>
  
  <p>my <code>AJAX</code> request is: </p>
  
  <pre><code>addneighborhood(){
       const payload = {
         neighborhood: this.addneighborhoodform.form.value.addneighborhoodinput
       };
       this.suitsettingsservice.addneighborhood(payload)
         .subscribe(
           (req: any)=&gt;{
               this.selectedcityneighborhoods.push(req);
           });
  </code></pre>
  
  <p>the error I am getting is: </p>
  
  <pre><code>HttpErrorResponse {headers: HttpHeaders, status: 400, statusText: "Bad Request", url: "http://127.0.0.1:8000/api/suitsadmin/settings/neighborhoodbycity", ok: false, …}
  error:city :  "This field is required."
  </code></pre>
  
  <p>It is saying the city object is required. but I am not asking for it in the serializer. I am not sure what I am doing wrong.</p>
  
  <p>edit: I attempted the fix recommended in this post: 
  <a href="https://stackoverflow.com/questions/34661853/django-rest-framework-this-field-is-required-with-required-false-and-unique">Django REST Framework : &quot;This field is required.&quot; with required=False and unique_together</a></p>
  
  <p>of passing the city object into the serializer </p>
  
  <pre><code>  def post(self, request, *args, **kwargs):
          citypk = kwargs.get('citypk', None)
          city=get_object_or_404(SearchCity,pk=citypk)
          serialized = SearchNeighborhoodSerializer(city,data=request.data)
  </code></pre>
  
  <h1>city passsed into serializer above</h1>
  
  <p>but it didnt change anything</p>
  
  <p>edit:</p>
  
  <p>I attempted to set the serializers city field to read only. But that also didnt help</p>
  
  <p>Thank you for your help.</p>