Reputation: 11
I'm making an administrative tool, and I need to list all my auth users on webapp2. The problem is that the User model of auth models doesn't have the all() method.
So, how can I get all users on webapp2?
Upvotes: 0
Views: 186
Reputation: 13138
Edited to show a more complete example:
from webapp2_extras.appengine.auth.models import User
class UserHandler(BaseHandler):
def get(self):
users = User.query().fetch()
self.render_response('templates/users.html', locals())
Inside the template, users.html
, you can loop through the users
variable.
My BaseHandler
includes the method render_response()
to render a template.
Upvotes: 1