Q:

"": "StudentsSubmittedDocument. Students_Enrollment_Records" must be a "StudentsEnrollmentRecord" instance

views.py
    id = request. POST.get('ids')
    studentname = StudentProfile(id=id)

    myfile = request. FILES['myfile']
    fs = FileSystemStorage()
    filename = fs.save(myfile.name, myfile)
    uploaded_file_url = fs.url(filename)
    student = StudentsEnrollmentRecord. Student_Users

    V_insert_data = StudentsEnrollmentRecord(
            Student_Users=studentname, Payment_Type=payment,
            Education_Levels=educationlevel,School_Year=schoolyear
        )
        V_insert_data.save()
        insert_doc = StudentsSubmittedDocument(
            Students_Enrollment_Records = studentname,
            Document = myfile
        )
        insert_doc.save()

    return render(request, 'Homepage/pending.html')

models.py
class StudentProfile(models. Model):
    DoesNotExist = None
    objects = None
    Pending_Request = [
        ('Pending_Request', 'Pending_Request'),
        ('Enrolled', 'Enrolled'),
    ]
    Image = models. ImageField(upload_to='images',null=True,blank=True)
    Username = models. CharField(max_length=500,null=True,blank=True)
    Password = models. CharField(max_length=500,null=True,blank=True)
    LRN = models. IntegerField(null=True,blank=True)
    Firstname = models. CharField(max_length=500,null=True,blank=True)
    Middle_Initial = models. CharField(max_length=500,null=True,blank=True)
    Lastname = models. CharField(max_length=500,null=True,blank=True)

class StudentsEnrollmentRecord(models. Model):
    Student_Users = models. ForeignKey(StudentProfile, related_name='+', on_delete=models. CASCADE,null=True)
    School_Year = models. ForeignKey(SchoolYear, related_name='+', on_delete=models. CASCADE, null=True, blank=True)
    Courses = models. ForeignKey(Course, related_name='+', on_delete=models. CASCADE, null=True, blank=True)

class StudentsSubmittedDocument(models. Model):
    Students_Enrollment_Records = models. ForeignKey(StudentsEnrollmentRecord, related_name='+', on_delete=models. CASCADE,blank=True,null=True)
    Document_Requirements = models. IntegerField(null=True,blank=True)
    Document = models. FileField(upload_to='files',null=True,blank=True)

How to fix this error?  i tried so many times to fix this but i can't, i don't know how to fix this error, i just want to save the StudentsEnrollmentRecord(Student_Users) to StudentsSubmittedDocument(Students_Enrollment_Records), by the way this is my error:
ValueError at /newEnroll/ Cannot assign "": "StudentsSubmittedDocument. Students_Enrollment_Records" must be a "StudentsEnrollmentRecord" instance. 

A:

In your variable insert_doc, change your Students_Enrollment_Records argument from studentname to V_insert_data, so it would be like this:
insert_doc = StudentsSubmittedDocument(
    Students_Enrollment_Records = V_insert_data,
    Document = myfile
)

The error is clearly saying that your are not assigning the correct instance to your Students_Enrollment_Records field in your StudentsSubmittedDocument model. 
PD: I would suggest you to change the names of your ForeignKey fields and make them singular, since it's pointing only to one record, and plural names may lead to confusion.