(self, user=None)
Constructor.

        :param django.contrib.auth.models.User user:
Constructor.
Constructor .
def __init__(self, user=None):
        """Constructor.

        :param django.contrib.auth.models.User user:
        """
        assert self.uid
        assert self.name
        assert self.view_template_name
        assert self.edit_template_name
        assert self.placeholders
        assert self.cell_units and self.cell_units in LAYOUT_CELL_UNITS
        assert isinstance(self.media_js, (list, tuple))
        assert isinstance(self.media_css, (list, tuple))

        if isinstance(self.media_js, tuple):
            self.media_js = list(self.media_js)

        if isinstance(self.media_css, tuple):
            self.media_css = list(self.media_css)

        self.placeholders_dict = {}
        self.placeholder_uids = []
        for placeholder in self.placeholders:
            self.placeholders_dict.update({placeholder.uid: placeholder})
            self.placeholder_uids.append(placeholder.uid)

        self.user = user
        self.widget_media_js = []
        self.widget_media_css = []
def __init__ ( self , user = None ) : assert self . uid assert self . name assert self . view_template_name assert self . edit_template_name assert self . placeholders assert self . cell_units and self . cell_units in LAYOUT_CELL_UNITS assert isinstance ( self . media_js , ( list , tuple ) ) assert isinstance ( self . media_css , ( list , tuple ) ) if isinstance ( self . media_js , tuple ) : self . media_js = list ( self . media_js ) if isinstance ( self . media_css , tuple ) : self . media_css = list ( self . media_css ) self . placeholders_dict = { } self . placeholder_uids = [ ] for placeholder in self . placeholders : self . placeholders_dict . update ( { placeholder . uid : placeholder } ) self . placeholder_uids . append ( placeholder . uid ) self . user = user self . widget_media_js = [ ] self . widget_media_css = [ ]