I have a model Course that has the following attr:

```
class Course(models.Model):
    user= models.ForeignKey(
        User,
        on_delete=models.CASCADE,
        )
    # email= models.EmailField(default=user.email)
    courseName= models.CharField(max_length=20, blank=False)

    class Meta:
        unique_together= ('user','courseName',)

    def __str__(self):
        return self.courseName

```

I have created a form where I want the user to enter just the courseName and after they POST it, I will add the requested user in the model as well.

This is my form which is getting passed on to the template via my ListView

forms.py

```
class CourseForm(forms.ModelForm):
    class Meta:
        model= Course
        fields = ['courseName']

```

\*\*Here is my views.py where I am struggling with \*\*

```
class CoursesListView(ListView, FormMixin):
    model = Course
    form_class = CourseForm
    template_name = "userApp/courseList.html"

    def get_queryset(self):
        return Course.objects.filter(user__exact=self.request.user)

    def get_context_data(self,*args,**kwargs):
        context= super(CoursesListView,self).get_context_data(*args, **kwargs)
        context['courseForm'] = self.form_class
        return context

    def post(self,request, *args, **kwargs):
        form = self.form_class(request.POST)
        user = User.objects.get(username__exact=self.request.user)

        **I want to add the user to my model.user field here**

        return self.get(redirect, *args, **kwargs)

    def get(self,request, *args, **kwargs):
        self.object=None
        self.form = self.get_form(self.form_class)
        return ListView.get(self, request, *args, **kwargs)

```

So basically my question is how can I add the user in my model before calling form.is\_valid().