Add form config for generating 'shopfoo' projects

This commit is contained in:
Lance Edgar 2023-05-08 21:43:19 -05:00
parent 2f5e01c9e9
commit 8fcef1fb4d

View file

@ -293,6 +293,31 @@ class GeneratedProjectView(MasterView):
f.set_helptext('integration_url', "Reference URL for the system to be integrated") f.set_helptext('integration_url', "Reference URL for the system to be integrated")
f.set_default('integration_url', "https://www.example.com/") 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): def configure_form_tailbone_integration(self, f):
f.set_grouping([ f.set_grouping([
@ -320,6 +345,27 @@ class GeneratedProjectView(MasterView):
# has_static_files # has_static_files
f.set_helptext('has_static_files', "Register a subfolder for static files (images etc.)") 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): def configure_form_byjove(self, f):
f.set_grouping([ f.set_grouping([