--
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+unsubscribe@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/CADwzVRvSLYGOAyxsRWm%2BRN4hKwK3S3ig3dQNQzhNj2PRSebP2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/CADwzVRvSLYGOAyxsRWm%2BRN4hKwK3S3ig3dQNQzhNj2PRSebP2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On 14 Mar 2018, at 09:09, Manasvi Saxena <msma...@gmail.com> wrote:
Create libraries in python and integrate them with Django to generate HTML code for front-end development and thus contributing to make Django a full-stack framework.
For Python developers, it is an extra work to learn HTML and CSS to create a Front-end for a website. I intend to simplify their life by creating libraries that will convert Python code into HTML code to generate an HTML page.
Please let me know what do you think of the idea and help me refine it.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/CADwzVRvSLYGOAyxsRWm%2BRN4hKwK3S3ig3dQNQzhNj2PRSebP2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Think of this library as a bridge between Python and HTML, you don't need to know the syntax of HTML, just need to know which function of the library creates what output. After you have created the content of your page just pass it to a function in a list and you have your HTML page.Have a look at the prototype and let me know what you think of it.
--
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-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/c4a290e2-ca6a-476e-8339-57c967db6a53%40googlegroups.com.
--
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-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/4427f2cd-d843-43db-b807-5f3468635b2e%40googlegroups.com.
ET.dump(b) # will match aboveb.append(c)c.tail = " world"c.text = "ignore this"c = ET.Element('i')b.text = "hello "b = ET.Element('p')Note that this gets even weirder with something like "<p>hello <i>ignore this</i> world</p>".ET.dump(a) # will match yoursa.text = "hello world"a = ET.Element('p', style='{color: red;}')import xml.etree.ElementTree as ETIt's interesting, but I'll ask if one can get 90% of the functionality from xml.etree, which is in the standard Python Library.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.
--
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+unsubscribe@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.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@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.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@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.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d7c3d5a2-a205-4aea-adf9-2758df190d09%40googlegroups.com.
Hey Manasvi,I'm perhaps a bit biased but I would be very interested in anything that can make JavaScript a real first class citizen in Django. There are a number of third party packages out there that attempt something like this (i.e django-webpack-loader). Django is classically quite conservative, and up until relatively recently the JavaScript ecosystem has been in flux with a relatively high amount of churn when it comes to build tools and best practices.Things have somewhat stabalized recently with webpack achieving widespread adoption so perhaps it's time to evaluate the landscape and see if we can improve in this area. I'd love to see some kind of pluggable JavaScript build system that would make modern JavaScript a first class citizen alongside templates and other static assets, separate or as an extension to the classic static assets functionality in Django.
All in all I am quite jealous of how Rails handles JavaScript integrations[1]. Again, this is just my personal opinion and I cannot say if pursuing this will in any way effect your chances of being accepted but this seems likes really interesting direction to investigate and more practically useful than yet another way of generating static server side HTML.Tom
--
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-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/00e13803-b9af-4c76-9f0d-9d1f226c0acf%40googlegroups.com.
Hi.As pointed out I believe this is not getting accepted as GSoC project for Django.But if you really believe that your approach is beneficial to larger audience and you feel that it is right thing to do just do it. It is only way to prove that you're right. Of course you could be wrong as well but hey at least you did tried.Having JavaScript builder pipeline might provide more fruitful though getting such as GSoC project is really long shot.
--
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-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/c7d3227d-10e9-4775-92af-9acb36554759%40googlegroups.com.
Hi.Yes I read your initial proposal and in my experience putting any frontend stuff to python code is disaster. Hard to maintain hard to understand when pages do get more complex.In my understanding it is also general consencus and for that reason Django itself moved form widget rendering from python code to template based widgets.la 17. maaliskuuta 2018 klo 9.26 Manasvi Saxena <msma...@gmail.com> kirjoitti:Hello,--
On Saturday, March 17, 2018 at 12:42:50 PM UTC+5:30, Jani Tiainen wrote:Hi.As pointed out I believe this is not getting accepted as GSoC project for Django.But if you really believe that your approach is beneficial to larger audience and you feel that it is right thing to do just do it. It is only way to prove that you're right. Of course you could be wrong as well but hey at least you did tried.Having JavaScript builder pipeline might provide more fruitful though getting such as GSoC project is really long shot.Did you go through what my initial idea was? what do you think of that? the pyhtml library and assisting Django templating language. Do you have any suggestions on how I can improve that too?
Also, can you through some light on what you said about JavaScrip builder pipeline?
I could really use your valuable feedback.
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-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/c7d3227d-10e9-4775-92af-9acb36554759%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/ldhY8sAQc-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-developers+unsubscribe@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/4e742fb4-84ab-4ae1-9aca-f6c2c79b4f24%40googlegroups.com.
Hi!
I think you should read the links about Knockout.js templates, Vue.js templates and about XSLT templates and their support via lxml library.Read about custom tags in XSLT and maybe in JSX.Also read more about lxml library and how to use it.Hope that will help you to improve your proposal.Dmitriy
Well, you should probably look at past examples of such things, like TAL
for the server side, and ... just about every JS framework of today
(svelte, Vue, Knockout, etc :)
lxml should make it easy to parse, iterate, walk, mutate the DOM tree...
now you need to determine a syntax.
--
Curtis
--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/ldhY8sAQc-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/b708db98-2fe9-fcdf-cb1b-3978e5ee4eb2%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.
I'll give some background. The Django Templating Language was very specifically designed to NOT allow putting business logic or allow calling arbitrary functions in the template. Jinja2 loosened up that a bit, but it still doesn't let you do whatever you want. There's a couple reasons, but one is performance. Django gains a lot of optimizations because all database queries can happen in a small region. It also means one cannot potentially have 3 functions that each request the same data thus doing 3 DB queries, which is very slow.
It is also generally "bad form" to mix your business logic and your display logic. I get that there's some times where it's much simpler to break that separation. That is part of why Jinja2 gained some traction (though I personally really like the better whitespace control). It also creates a much better chance for a security flaw and maintenance issues. Obviously, there is nothing stopping you from creating such a templating language. It may get really popular.Finally, I'll mention that there's nothing in Django that stops you from just changing the template language used. It's as simple as not using the render shortcut function. The joy of Python is that you just need to generally match the interface.Not to be mean, but I wanted to point out what's being proposed. Your proposal is that Django pays you to create yet another templating language that they have to support. This leads to three separate paths that the code can take. There then needs to be some ability to cross communicate between all three languages. Then there's the "sales" end of explaining why there's 3 templating languages and why one needs to choose another. One of the real selling points of Django over other frameworks is that they're opinionated and chose a specific set of tools. I started back in Pylons/TurboGears, and I would spend a long time looking over which DB layer to chose and which templating language to chose. In the end, I'll say that it was refreshing to go to Django and have some of that chosen for you and to just start working.I really do wish you the best of luck if you attempt to make this. I'm sure there is a need, but I personally do not see it being a direct fit into Django.
--
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-develop...@googlegroups.com.
To post to this group, send email to django-d...@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/3033808a-ccf9-4cb1-ad8b-6d2e19cca64b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I like theses idea less and less evertime.What is your usecase for a smarter rendering engine ? You can already compute complex things in the view, store it in the rendering context and simply display it in the template.The first idea was only slightly in the wrong direction, but could produce some valuable work. Producing HTML using python is awkward. But producing interface is another matter. If your library provide ban interface like "on the left there is a listView widget, connected to this queryset. When an item is selected, it will use that function to generate a rich widget for editing the model and display the widget on the right".That kind of library would be a lot more like writing gtk or Qt application. There are other webframework doing that, I'm thinking of nitrogen, an Erlang framework. Maybe toga-django already try to produce such library
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/ef819f36-9ace-4613-8c38-423a36677638%40googlegroups.com.