def get_theme(self): """ Get the theme object to configure. :return: Theme object :rtype: shoop.xtheme.Theme """ return get_theme_by_identifier( identifier=self.kwargs["theme_identifier"], settings_obj=self.object)
def get_theme(self): """ Get the theme object to configure. :return: Theme object :rtype: shoop.xtheme.Theme """ return get_theme_by_identifier( identifier=self.kwargs["theme_identifier"], settings_obj=self.object )
def _populate_vars(self): theme = get_theme_by_identifier(self.request.GET["theme"]) if not theme: raise Problem(_("Unable to determine current theme.")) self.view_config = ViewConfig(theme=theme, view_name=self.request.GET["view"], draft=True) self.placeholder_name = self.request.GET["ph"] self.default_layout = self._get_default_layout() self.layout = self.view_config.get_placeholder_layout( placeholder_name=self.placeholder_name, default_layout=self.default_layout) (x, y) = self.current_cell_coords = ( int(self.request.GET.get("x", -1)), int(self.request.GET.get("y", -1)), ) self.current_cell = self.layout.get_cell(x=x, y=y) self.build_form()
def _populate_vars(self): theme = get_theme_by_identifier(self.request.GET["theme"]) if not theme: raise Problem(_("Unable to determine current theme.")) self.view_config = ViewConfig( theme=theme, view_name=self.request.GET["view"], draft=True ) self.placeholder_name = self.request.GET["ph"] self.default_layout = self._get_default_layout() self.layout = self.view_config.get_placeholder_layout( placeholder_name=self.placeholder_name, default_layout=self.default_layout ) (x, y) = self.current_cell_coords = ( int(self.request.GET.get("x", -1)), int(self.request.GET.get("y", -1)), ) self.current_cell = self.layout.get_cell(x=x, y=y) self.build_form()