Best practice for adding content types and views in cookieplone-based backend projects

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.

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.

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

Really!?
That's great!
Thanks @erral will try out make add on this project

1 Like

@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.

@davisagli yes, I'm seeing it in the backend README, I missed that as I only read the main README.