title: ValueError: Cannot assign "'26 Balkanskaya Street'": "paidparking.adress" must be a "Parking" instance
body: <p>I have a model <code>paidparking</code></p>
  <pre><code> class paidparking(models.Model):
          adress = models.ForeignKey(Parking, on_delete=models.SET_NULL, null=True)
          carnumber = models.CharField(max_length=150)
          amountoftime = models.IntegerField()
          price = models.FloatField()
          telephone = models.CharField(max_length=20)
          email = models.EmailField(,null=True,blank=True )
          datetimepaidparking = models.DateTimeField(auto_now_add=True)
          expirationdate = models.DateField(null=True)
          expirationtime = models.TimeField(null=True)
          enddateandtime = models.DateTimeField(null=True,blank=True)
  </code></pre>
  <p>Model Parking:</p>
  <pre><code>class Parking(models.Model):
      adress = models.CharField(max_length=150)
      starttime = models.TimeField(auto_now=False, auto_now_add=False,null=True)
      endtime = models.TimeField(auto_now=False, auto_now_add=False,null=True)
      minimaltimeforpayment = models.CharField(max_length=50)
      price = models.IntegerField()
      numberofavailableseats = models.IntegerField(default=0)
      tickets = models.ManyToManyField('tickets', blank=True)
  </code></pre>
  <p>I have a page on the site where there is a form. Through this form I save the data to the model</p>
  <pre><code>class paidparkingForm(forms.ModelForm):
    class Meta:
        model = paidparking
        fields = ['adress','carnumber','amountoftime', 'price', 'email','telephone','expirationdate','expirationtime','enddateandtime']
        widgets = {
            'adress': forms.Select(attrs={&quot;class&quot;: &quot;form-control form&quot;, &quot;id&quot;: &quot;exampleFormControlSelect1&quot;}),
            'carnumber': forms.TextInput(attrs={&quot;class&quot;: &quot;form-control form-control-lg form&quot;}),
            'amountoftime': forms.NumberInput(attrs={&quot;class&quot;: &quot;number form-control form-control-lg form&quot;, &quot;disabled&quot;: 1}),
            'price': forms.NumberInput(attrs={&quot;class&quot;: &quot;form-control form-control-lg form&quot;, &quot;readonly&quot;: 0}),
            'email': forms.EmailInput(attrs={&quot;class&quot;: &quot;form-control form-control-lg form&quot;}),
            'telephone': forms.TextInput(attrs={&quot;class&quot;: &quot;form-control form-control-lg form&quot;}),
            'expirationdate': forms.DateInput(attrs={&quot;type&quot;: &quot;date&quot;,&quot;class&quot;: &quot;form form-control form-control-lg&quot;, &quot;disabled&quot;: 1}),
            'expirationtime': forms.TimeInput(attrs={&quot;type&quot;: &quot;time&quot;, &quot;class&quot;: &quot;form form-control form-control-lg&quot;, &quot;disabled&quot;: 1}),
            'enddateandtime':  forms.TextInput(attrs={&quot;class&quot;: &quot;form form-control form-control-lg&quot;, &quot;readonly&quot;: 0}),
        }
  </code></pre>
  <p>How do I save data to the model directly from the function?</p>
  <p>I do this</p>
  <pre><code>def save_payment_parking(request):
      adress = request.GET[&quot;adress&quot;]
      carnumber = request.GET[&quot;car_number&quot;]
      amountoftime = request.GET[&quot;amount_of_time&quot;]
      price = request.GET[&quot;price&quot;]
      telephone = request.GET[&quot;telephone&quot;]
      expirationdate = request.GET[&quot;date_time_paid_parking&quot;]
      expirationtime = request.GET[&quot;expiration_time&quot;]
      enddateandtime = request.GET[&quot;end_date_and_time&quot;]
      save_payment_parking = paidparking
      save_payment_parking(adress=adress
                           ,carnumber=carnumber,amountoftime=amountoftime,price=price,telephone=telephone,expirationdate=expirationdate,expirationtime=expirationtime,enddateandtime=enddateandtime).save()
  </code></pre>
  <p>But I get an error</p>
  <pre><code>ValueError: Cannot assign &quot;'26 Balkanskaya Street'&quot;: &quot;paidparking.adress&quot; must be a &quot;Parking&quot; instance.
  </code></pre>
  <p>I have a key inserted in the adress field from the Parking adress field. How do I make it so that my line is inserted in the adress field? The adress field in the Parking model has the value of my row. Perhaps you need to somehow determine the id of the record where my string is equal to the value in the adress field of the Parking model and insert this id</p>