'Create a new post, if the thread is unlocked.'

def new_post(self, author, content):

    if self.is_locked:
        raise ThreadLockedError
    return self.post_set.create(author=author, content=content)
