pigeonflight
(David Bain (dbain.com))
November 28, 2024, 4:29pm
1
I've created my new project using Cookieplone
I now have my backend code all in the backend folder. What's the best practice for generating boilerplate for new backend content types and views.
In the past I've used plonecli, I also see cookiecutter.
pigeonflight
(David Bain (dbain.com))
November 28, 2024, 4:39pm
2
I know I can follow the principles in 12. Content types II: Talk – Mastering Plone 6 development — Plone Training 2024 documentation
My goal is to go from Cookieplone to content types and custom api endpoints using boilerplate where possible, so I only need to worry about business logic.
erral
(Mikel Larreategi)
November 29, 2024, 2:58am
3
you can use make add in the backend folder with the same syntax as in plonecli to add your content types and all other subtemplates
3 Likes
pigeonflight
(David Bain (dbain.com))
November 29, 2024, 3:51am
4
Really!?
That's great!
Thanks @erral will try out make add
on this project
1 Like
davisagli
(David Glick)
November 29, 2024, 1:25pm
5
@pigeonflight Note, this was just added to the template in the past few days (Add plonecli/bobtemplates.plone compatible markers and configuration by erral · Pull Request #63 · plone/cookieplone-templates · GitHub ) so you might need to create a project again if you started one before that was added.
Check the readme in the generated backend folder for a bit more information on how to use the make add
command.
pigeonflight
(David Bain (dbain.com))
November 29, 2024, 2:19pm
6
@davisagli yes, I'm seeing it in the backend README, I missed that as I only read the main README.