M
M
Maxim Stikharev2018-05-04 17:20:47
Django
Maxim Stikharev, 2018-05-04 17:20:47

How to get user id from human submitted form?

There is a form in which a logged in user adds an account from VK(login)
How to connect user id and this login in the database? User model did not change.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Web Dentist, 2018-05-04
@maximifn

#models.py
...
vk_login = ...
...

#views.py
user = request.user
user.vk_login = request.POST['login']
user.save()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question