How to get user id from sent human form?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
14 views
There is a form that logged the user adds an account of VK(login)
How to link user id and this login in the database? The User model is not changed.
by | 14 views

2 Answers

0 like 0 dislike
#models.py ... vk_login = ... ... #views.py user = request.user user.vk_login = request.POST['login'] user.save()
by
0 like 0 dislike
You need to model user was the login field?
Then, for example, to override the user model , add the login field.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Apr 10, 2019 by Witosser
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
0 comments
35,595 users