예제 #1
0
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
예제 #2
0
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