@register.filter
def can_moderate(obj, user):
 return obj.can_moderate(user)

@ register . filter def can_moderate ( obj , user ) : return obj . can_moderate ( user )
takes article or related to article model .