Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Metronic and Python/Flask


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?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


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.



Hi,

Please have a look at this video tutorial that shows server side integration with Metronic Layout Builder.

Regards.



Hi Michael,
Yes little confusing, do you have any boilerplate of this project that you could share ??


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(