def category_creator(**kwargs): category, created = Category.objects.get_or_create(title=conf.CATEGORY_NAME) if created: category.parent = video.category_creator() category.plugin = __name__ # inserts the name of this module as the controller for this category return category
def category_creator(**kwargs): category, created = Category.objects.get_or_create(title=conf.CATEGORY_NAME) if created: category.parent = video.category_creator() category.plugin = __name__ return category