Beispiel #1
0
 def panes(self):
     shop = self.request.shop
     pane_id = self.request.GET.get("pane_id", None)
     panes = load_setup_wizard_panes(
         shop=shop,
         request=self.request,
         # if the user presses "previous" then "next" again, resubmit the form
         visible_only=self.request.method == "GET",
     )
     if not panes and pane_id:
         pane = load_setup_wizard_pane(shop=shop, request=self.request, pane_id=pane_id)
         if pane:
             panes.append(pane)
     return panes
Beispiel #2
0
 def panes(self):
     shop = Shop.objects.first()
     pane_id = self.request.GET.get("pane_id", None)
     panes = load_setup_wizard_panes(
         shop=shop,
         request=self.request,
         # if the user presses "previous" then "next" again, resubmit the form
         visible_only=self.request.method == "GET"
     )
     if not panes and pane_id:
         pane = load_setup_wizard_pane(
             shop=shop,
             request=self.request,
             pane_id=pane_id
         )
         if pane:
             panes.append(pane)
     return panes