def presenter_widget(node, kw): request = kw.get('request') choices = [ ('', '- None -'), ] for user in User.get_all(request): choices.append((str(user.pk), user.display_name)) return deform.widget.SelectWidget(values=choices)
def admin(request): return {'users': User.get_all(request)}