Python Forum

Full Version: Flask assertion error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Traceback (most recent call last):
File "blog.py", line 118, in <module>
@login_required
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1250, in decorator
self.add_url_rule(rule, endpoint, f, **options)
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 66, in wrapper_func
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1180, in add_url_rule
endpoint = _endpoint_from_view_func(view_func)
File "/usr/local/lib/python3.6/dist-packages/flask/helpers.py", line 90, in _endpoint_from_view_func
assert view_func is not None, 'expected view func if endpoint ' \
AssertionError: expected view func if endpoint is not provided.




#Flask login_required decorator is not running
Help me pls
Hi, I am following this tutorial to, Please post some of your code so I can see what the problem is.
regards
paul