Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 12 lines (10 sloc) 0.443 kb
1 2 3 4 5 6 7 8 9 10 11 12
# -*- coding: utf-8 -*-
from menus.base import Menu
from django.core.exceptions import ValidationError

class CMSAttachMenu(Menu):
    cms_enabled = True
    name = None
    
    def __init__(self, *args, **kwargs):
        super(CMSAttachMenu, self).__init__(*args, **kwargs)
        if self.cms_enabled and not self.name:
            raise ValidationError("the menu %s is a CMSAttachMenu but has no name defined!" % self.__class__.__name__)
Something went wrong with that request. Please try again.