Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TypeError When I open user_profile_page #32

Open
leirace opened this issue Dec 3, 2017 · 1 comment
Open

TypeError When I open user_profile_page #32

leirace opened this issue Dec 3, 2017 · 1 comment

Comments

@leirace
Copy link

leirace commented Dec 3, 2017

File "/Users/Flask-User-starter-app-0.6/app/views/misc_views.py", line 40, in user_profile_page
form = UserProfileForm(request.form, current_user)
File "/usr/local/lib/python3.6/site-packages/wtforms/form.py", line 212, in call
return type.call(cls, *args, **kwargs)
TypeError: init() takes from 1 to 2 positional arguments but 3 were given

It's a nice Sample to learn flask. Great help to me , TKS!

@123mitnik
Copy link

in misc_views.py

change form = UserProfileForm(request.form, current_user) to form = UserProfileForm(obj=current_user) it should do the trick

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants