miguelgrinberg / REST-auth

Example application for my RESTful Authentication with Flask article.
http://blog.miguelgrinberg.com/post/restful-authentication-with-flask
MIT License
922 stars 337 forks source link

Get all users #5

Closed JackLe1991 closed 5 years ago

JackLe1991 commented 7 years ago

@app.route('/api/users', methods=['GET']) def index(): users = User.query.all() if not users: abort(400) return jsonify(users)

Result: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

500 Internal Server Error

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

miguelgrinberg commented 7 years ago

You need to run the server in debug mode, so that you can see a stack trace for the error.

miguelgrinberg commented 5 years ago

This issue will be automatically closed due to being inactive for more than six months. Please reopen if you need more assistance.