@register.filter
def is_locked(model):
 return (model.current_revision and model.current_revision.locked)

@ register . filter def is_locked ( model ) : return ( model . current_revision and model . current_revision . locked )
check if article is locked .