def index(self, product, testing=None): testing_calls = False if testing is not None: testing_calls = True found_product = self.retrieve_product(product) if type(found_product) is str: flash('Product not found, please check the URL and try again') return redirect('/') if not found_product.active: flash('Product is not active and cannot be used at this time') return redirect('/') api_calls = helper.gather_api_calls(found_product, testing_calls, found_product.get_sorted_groups()) restrict_regions, regions = helper.check_for_product_regions( found_product) favorites = helper.gather_favorites(True) temp_groups = found_product.get_sorted_groups() temp_groups.insert(0, '') feedback_form = forms.SubmitFeedback() return render_template('product_front.html', api_calls=api_calls, api_settings=found_product, api_groups=temp_groups, regions=regions, title=found_product.title, api_process='/%s/api/call/process' % product, testing=testing_calls, require_region=found_product.require_region, restrict_regions=restrict_regions, favorites=favorites, feedback_form=feedback_form)
def index(self, product, testing=None): testing_calls = False if testing is not None: testing_calls = True found_product = self.retrieve_product(product) if type(found_product) is str: flash("Product not found, please check the URL and try again") return redirect("/") api_calls = helper.gather_api_calls(found_product, testing_calls, found_product.get_sorted_groups()) restrict_regions, regions = helper.check_for_product_regions(found_product) favorites = helper.gather_favorites(True) temp_groups = found_product.get_sorted_groups() temp_groups.insert(0, "") feedback_form = forms.SubmitFeedback() return render_template( "product_front.html", api_calls=api_calls, api_settings=found_product, api_groups=temp_groups, regions=regions, title=found_product.title, api_process="/%s/api/call/process" % product, testing=testing_calls, require_region=found_product.require_region, restrict_regions=restrict_regions, favorites=favorites, feedback_form=feedback_form, )
def index(self, product, testing=None): testing_calls = False if testing is not None: testing_calls = True found_product = self.retrieve_product(product) if type(found_product) is str: flash('Product not found, please check the URL and try again') return redirect('/') if not found_product.active: flash('Product is not active and cannot be used at this time') return redirect('/') api_calls = helper.gather_api_calls( found_product, testing_calls, found_product.get_sorted_groups() ) restrict_regions, regions = helper.check_for_product_regions( found_product ) favorites = helper.gather_favorites(True) temp_groups = found_product.get_sorted_groups() temp_groups.insert(0, '') feedback_form = forms.SubmitFeedback() return render_template( 'product_front.html', api_calls=api_calls, api_settings=found_product, api_groups=temp_groups, regions=regions, title=found_product.title, api_process='/%s/api/call/process' % product, testing=testing_calls, require_region=found_product.require_region, restrict_regions=restrict_regions, favorites=favorites, feedback_form=feedback_form )
def index(self, product, testing=None): testing_calls = False if testing is not None: testing_calls = True found_product = self.retrieve_product(product) if type(found_product) is str: flash("Product not found, please check the URL and try again") return redirect("/") api_calls = helper.gather_api_calls(found_product, testing_calls) restrict_regions, regions = helper.check_for_product_regions(found_product) return render_template( "product_front.html", api_calls=api_calls, api_settings=found_product, regions=regions, title=found_product.title, api_process="/%s/api/call/process" % product, testing=testing_calls, require_region=found_product.require_region, restrict_regions=restrict_regions, )