diff --git a/tailbone/views/master.py b/tailbone/views/master.py index a1f531f1..c8264a12 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -881,6 +881,14 @@ class MasterView(View): url = self.request.route_url('people.view', uuid=person.uuid) return tags.link_to(text, url) + def render_user(self, obj, field): + user = getattr(obj, field) + if not user: + return "" + text = six.text_type(user) + url = self.request.route_url('users.view', uuid=user.uuid) + return tags.link_to(text, url) + def before_create_flush(self, obj, form): pass diff --git a/tailbone/views/people.py b/tailbone/views/people.py index caf8d03e..748cf0a6 100644 --- a/tailbone/views/people.py +++ b/tailbone/views/people.py @@ -424,6 +424,7 @@ class PersonNoteView(MasterView): super(PersonNoteView, self).configure_form(f) f.set_renderer('person', self.render_person) + f.set_renderer('created_by', self.render_user) @colander.deferred