Hello Sir, Okay, so the idea is to render HTML by generally defining it in Python. I > could've sworn that I'd seen something like this years ago, but I'm failing > to find it. That stated, I think this is basically a generating version of > BeautifulSoup (https://www.crummy.com/software/BeautifulSoup/bs4/doc/) as > opposed to a parsing version. > > It's roughly like the Storm ORM (https://storm.canonical.com/) but for > HTML instead of database queries. > > It's interesting, but I'll ask if one can get 90% of the functionality > from xml.etree, which is in the standard Python Library. > > import xml.etree.ElementTree as ET > > a = ET.Element('p', style='{color: red;}') > a.text = "hello world" > ET.dump(a) # will match yours > > Note that this gets even weirder with something like "<p>hello <i>ignore > this</i> world</p>". > > b = ET.Element('p') > b.text = "hello " > c = ET.Element('i') > c.text = "ignore this" > c.tail = " world" > b.append(c) > ET.dump(b) # will match above >
I'm sure xml.etree has its drawbacks which I will improve in my library. The whole idea here is to bring python closer in the picture of generating HTML content. Its applications are vast and not only limited to this. If time permits I intend to write a complete framework like Bootstrap for python where things like cards, navbars etc will be inbuilt and purely written on the basis of my library. And that is the new feather I intend to add to Django's hat. Just like we have some inbuilt 'forms' in Django we'll have a lot of other front-end related objects written in python and easily manipulative. And thus I intend to extend Django's reign in the front-end domain as well. And make it a full-stack framework. Surely designing is something that changes very frequently in today's world but if this is successfully implemented we can bring developers from front-end world to contribute to it too. Logic + Design. Regards, Manasvi Saxena -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/2cf482cc-0f2e-4182-ae34-951a74b43731%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.