rattail-demo/rattail_demo/web/views/users.py

26 lines
517 B
Python
Raw Normal View History

# -*- coding: utf-8; -*-
"""
User views
"""
from __future__ import unicode_literals, absolute_import
from tailbone.views import users as base
class UsersView(base.UsersView):
"""
Prevent edit/delete for 'chuck'
"""
def editable_instance(self, user):
return user.username not in ('chuck', 'demo')
def deletable_instance(self, user):
return user.username not in ('chuck', 'demo')
def includeme(config):
UsersView.defaults(config)
2017-08-13 23:12:38 -05:00
base.UserEventsView.defaults(config)