Hey, I'm trying to use Metronic on a Python/Flask project and I don't see a straightforward way of handling the includes/partials. DO you have a setup video for that I can refer to?
Hi Michael,
Yes little confusing, do you have any boilerplate of this project that you could share ??
Hi,
Please have a look at this video tutorial that shows server side integration with Metronic Layout Builder.
Regards.
Hi Michael,
Since Django and Flask are not that different, I'm gonna give you my way how I did it.
1) I would suggest to use the Metronic builder to get the include/partials, that you can integrate into your flask Jinja2 template rendering machinery (This will make it it easy to follow the Keenthemes Metronic updates).
2) But in some cases you should inspect the whole index.html of your selected Metronic Demo and cut include/partials as small .html partials if the file structure of the Metronic builder (1) doesn't suit you.
NB : To make it KISS and DRY, you should create your own components into partials folder so you can use them in your entire application.
eg : partials/_generic_input_text.html --> whenever you want to use an input, just call this partial and include it inside your form.html,
if somehow, Keenthemes, changed the way inputs should be rendered (it happend before) all you have to do is just change this unique partial .html file, and all your inputs in your entire application will be fixed in a matter of a minute. you don't have to go hunt all your inputs.
This example is true for all components that you may need.
Hope it helps
Great explanation Riterix.
Ohh Hi Sean, LoL
Thank you.