[image: Capture.PNG]
*I have used a function-based View to get data from post Request. I need to get many data that also include a primary key field too. I need to push data into two models. While doing so, I encountered an error.* #accounts models.py from django.db import models class User(models.Model): user_id = models.PositiveIntegerField(blank=True) name = models.CharField(max_length=200) phone = models.CharField(max_length=200) email = models.EmailField(max_length=254) #app models.py from accounts.models import User #from accounts models.py class job(models.Model): user = models.ForeignKey(User, on_delete=models.DO_NOTHING) ...... #views.py data = job(.....,map_link=map_link,user_id=user_id) data.save() info=User(name=name,email=email,phone=phone,user_id=user_id) info.save() *Error Message: http://dpaste.com/03Z0EPB <http://dpaste.com/03Z0EPB>* -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f083194-4a44-4f09-94d2-5479fed45ab5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.