cedricbonhomme / newspipe

A web news aggregator.
https://www.newspipe.org
GNU Affero General Public License v3.0
425 stars 40 forks source link

Using delete feed on feed page give Traceback #9

Closed cedricbonhomme closed 8 years ago

cedricbonhomme commented 8 years ago

Using delete link http://127.0.0.1:5000/delete_feed/20 from a feed page http://127.0.0.1:5000/feed/20 produce error

#!txt

NameError: global name 'flash' is not defined

But feed is effectively deleted.

Full Traceback :

#!txt

Traceback (most recent call last):
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/benoit/depots/pyaggr3g470r/lib/python2.7/site-packages/flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "/home/benoit/depots/pyaggr3g470r/pyaggr3g470r/decorators.py", line 27, in decorated
    flash("This feed do not exist.", "danger")
NameError: global name 'flash' is not defined

cedricbonhomme commented 8 years ago

This fixes #3.

→ <<cset 33fab300b363>>


Original comment by: Cédric Bonhomme