@classmethod
def add(cls, title, creator, parent=None):
    """Creates a category.

        :param str title:
        :param User creator:
        :param Category|None parent:
        :return:
        """
    obj = cls(title=title, creator=creator, parent=parent)
    obj.save()
    return obj
