I am unable to figure out what exactly is the issue here. I keep getting below error:. When I visit my website.com/forgot I am using flask-security for user login and registration. But I am using custom registration with some extra fields. I cannot see how that can link reset not work... From the error it looks like its not able to find the template? I do have a forgot_password
template copied into my templates directory.
I have this enabled :
app.config['SECURITY_FORGOT_PASSWORD_TEMPLATE'] = True
app.config['SECURITY_SEND_PASSWORD_RESET_NOTICE_EMAIL'] = True
app.config['SECURITY_RECOVERABLE'] = True
forgot_password.html in templates/security has this code :
{% from "security/_macros.html" import render_field_with_errors, render_field %}
{% include "security/_messages.html" %}
<h1>Send password reset instructions</h1>
<form action="{{ url_for_security('forgot_password') }}" method="POST" name="forgot_password_form">
{{ forgot_password_form.hidden_tag() }}
{{ render_field_with_errors(forgot_password_form.email) }}
{{ render_field(forgot_password_form.submit) }}
</form>
{% include "security/_menu.html" %}
I get this error from the server:
23,113 : return self.view_functions[rule.endpoint](**req.view_args)
2017-01-03 08:22:23,114 : File "/home/susarla/.virtualenvs/mynew_env/local/lib/python2.7/site-packages/flask_security/decorators.py", line 225, in wrapper
2017-01-03 08:22:23,114 : return f(*args, **kwargs)
2017-01-03 08:22:23,114 : File "/home/susarla/.virtualenvs/mynew_env/local/lib/python2.7/site-packages/flask_security/views.py", line 262, in forgot_password
2017-01-03 08:22:23,114 : **_ctx('forgot_password'))
2017-01-03 08:22:23,114 : File "/home/susarla/.virtualenvs/mynew_env/local/lib/python2.7/site-packages/flask_security/core.py", line 447, in render_template
2017-01-03 08:22:23,114 : return render_template(*args, **kwargs)
2017-01-03 08:22:23,114 : File "/home/susarla/.virtualenvs/mynew_env/local/lib/python2.7/site-packages/flask/templating.py", line 133, in render_template
2017-01-03 08:22:23,114 : return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
2017-01-03 08:22:23,114 : File "/home/susarla/.virtualenvs/mynew_env/local/lib/python2.7/site-packages/jinja2/environment.py", line 854, in get_or_select_template
2017-01-03 08:22:23,114 : return self.select_template(template_name_or_list, parent, globals)
2017-01-03 08:22:23,114 : File "/home/susarla/.virtualenvs/mynew_env/local/lib/python2.7/site-packages/jinja2/environment.py", line 830, in select_template
2017-01-03 08:22:23,114 : for name in names:
2017-01-03 08:22:23,114 :TypeError: 'bool' object is not iterable