Y
Y
yuki2021-05-03 19:19:21
Django
yuki, 2021-05-03 19:19:21

How to find out from which user (id) the request came from?

I have a class in views.py

class ResumesCreate(LoginRequiredMixin, CreateView):
    model = ResumesModel
    form_class = ResumesForm
    template_name = "work/create.html"

    def form_valid(self, form):
        fields = form.save(commit=False)
        fields.client_id =

How to find out which user the request came from?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tema_sun, 2021-05-03
@rstJkee

self.request.user

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question