From 8fcef1fb4d586f76c2329dc06b2f6c4e64889706 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 8 May 2023 21:43:19 -0500 Subject: [PATCH] Add form config for generating 'shopfoo' projects --- tailbone/views/projects.py | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/tailbone/views/projects.py b/tailbone/views/projects.py index 8dc119f1..a412c388 100644 --- a/tailbone/views/projects.py +++ b/tailbone/views/projects.py @@ -293,6 +293,31 @@ class GeneratedProjectView(MasterView): f.set_helptext('integration_url', "Reference URL for the system to be integrated") f.set_default('integration_url', "https://www.example.com/") + def configure_form_rattail_shopfoo(self, f): + + # first do normal integration setup + self.configure_form_rattail_integration(f) + + f.set_grouping([ + ("Naming", [ + 'integration_name', + 'integration_url', + 'name', + 'pkg_name', + 'pypi_name', + ]), + ("Options", [ + 'has_cli', + ]), + ]) + + # default settings + f.set_default('integration_name', 'Shopfoo') + f.set_default('name', 'rattail-shopfoo') + f.set_default('pkg_name', 'rattail_shopfoo') + f.set_default('pypi_name', 'rattail-shopfoo') + f.set_default('has_cli', False) + def configure_form_tailbone_integration(self, f): f.set_grouping([ @@ -320,6 +345,27 @@ class GeneratedProjectView(MasterView): # has_static_files f.set_helptext('has_static_files', "Register a subfolder for static files (images etc.)") + def configure_form_tailbone_shopfoo(self, f): + + # first do normal integration setup + self.configure_form_tailbone_integration(f) + + f.set_grouping([ + ("Naming", [ + 'integration_name', + 'integration_url', + 'name', + 'pkg_name', + 'pypi_name', + ]), + ]) + + # default settings + f.set_default('integration_name', 'Shopfoo') + f.set_default('name', 'tailbone-shopfoo') + f.set_default('pkg_name', 'tailbone_shopfoo') + f.set_default('pypi_name', 'tailbone-shopfoo') + def configure_form_byjove(self, f): f.set_grouping([