add_comment_button should be hidden with initially_hidden css class if can_create_comment permission is false => do not set this css property directly on html element.
def update(obj, kwargs):
"""
Update obj attributes with values from kwargs
"""
for k,v in kwargs.items():
if hasattr(obj,k):
setattr(obj,k,v)