[Flask] Jijna2 default templates

Adam Steer Adam.Steer at anu.edu.au
Thu Apr 14 07:52:13 EDT 2016


Hi Satya

A long time ago I built web things with HTML (before such things as dynamic web pages existed) and then PHP, and haven’t built web pages in more than ten years.

I am very new to Flask, until January this year I had never heard of either Flask or Jinja2. However, I’ve found Jinja2 quite natural and easy to get along with. I’m not using all of its features yet, but it’s very easy to set up, get variables from Flask onto a page, have some things that appear under certain conditions or not - and even create nice error handling pages!

Some parts of Flask have driven me absolutely nuts, but I’m getting there. Jinja2, on the other hand, has been a breeze - probably because it’s quite similar to how I used to do things a long time ago.

All that probably isn’t super helpful - I’m hopefully encouraging you to just have a go and see how it works. Jinja2 is not scary at all - if you can understand variables, and dig a bit into how Flask works, Jinja2 will take the least of your time.

Regards
Adam



> On 14 Apr 2016, at 9:42 PM, Satya Elipe <satya.elipe at gmail.com> wrote:
> 
> Hi Alejo
> 
> Thanks for the prompt response and for the useful info.
> 
> Got it. So if I want to build up a web app (mostly for static info, with drop down boxes), how easy or difficult it is to use jinja ?
> 
> In general how easy it is to learn jinja for a new comer like me in web development (I heard jinja is powerful with its powerful library and inheritance, hence through of picking it up for my career on web development).
> 
> Kindly advise. 
> 
> Sure, will take a look at below pointers. 
> 
> Thanks
> Satya
> 
> 
> 
> On Thursday, 14 April 2016, Alejo Arias <alejoar at gmail.com> wrote:
> Hello Satya,
> 
> Jinja is a templating language and there are no "default" templates as far as I know. It is like asking for a "default" flask application. I guess what you are really asking for might be a "hello world" flask application that uses Jinja.
> 
> There are several guides to learn how to use Jinja with examples that you can find googling a bit. Here's one: https://realpython.com/blog/python/primer-on-jinja-templating/
> 
> In that tutorial they use Bootstrap with Jinja, which might be closer to what you were looking for if you assume Bootstrap as a default template.
> 
> Miguel Gringberg's flask book also guides you through using Jinja with bootstrap, I recommend reading it.
> 
> Hope that helps.
> 
> Regards,
> Alejo
> 
> 
> On 14 April 2016 at 12:41, Satya Elipe <satya.elipe at gmail.com> wrote:
> Hello
> 
> I'm new to flask web development.
> 
> Just wondering if there's any default templates available in ninja2 that I can just import and use ?
> 
> Also would be great if some one comment on the best way to use those default templates.
> 
> Just want to give it a try with default templates rather than start creating my own to begin with.
> 
> Thanks in anticipation
> Satya
> 
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
> 
> 
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask



More information about the Flask mailing list