HTML5 <details> & <summary> reformatting

This commit is contained in:
Philip Sargent
2021-04-09 16:15:51 +01:00
parent f2d83f1926
commit f52b3d87ae
3 changed files with 112 additions and 59 deletions

View File

@@ -47,10 +47,12 @@ browser (or a progressive web app) using a python interpreter running in
javascript. [yeah, expofiles would need some subset labelled as needing to
be forcibly downloaded, but the rest coming only on demand.] Some django
enthusiast must have done this already surely ? Ah yes, Brython.<br>
<a href="https://github.com/brython-dev/brython">github.com/brython-dev/brython</a><br>
<a href="https://www.brython.info/">www.brython.info</a>
<a href="https://github.com/brython-dev/brython">github.com/brython-dev/brython</a> &nbsp; &nbsp;
<a href="https://www.brython.info/">www.brython.info</a> and <br>
<a href="https://skulpt.org/gallery.html">Skulpt</a> (which has, since 2017, a full-blown
<a href="https://anvil.works/features">commerical system(</a>) built on top of it - by a CambridgeCL spinout)</br>
<p>
Which is fun, but not useful. And not just because it is immature. None of
Which is fun, but not useful. And not just because it may be immature. None of
this addresses <strong>our biggest problem: devising something that can be
maintained by fewer, less-expert people who can only devote short snippets
of time and not long-duration immersion</strong>.
@@ -106,7 +108,10 @@ not a function within the python codebase.
(We could retain an HTML templating engine though.)
<h3><em>Addendum</em></h3>
<h3><em>Addendum 1</em></h3>
<p>The above discussion is extremely ignorant in a couple of respects. Now (April 2021) we can properly appreciate that the part of Django that interacts with a database is actually a small part of the system. The http request/response engine is not easily replaced. And the 90 or so HTML templates do not just reformat the data given to them in python dictionaries: they directly query and traverse the database to produce tabular output. So if we 'took out' the database, most of our templates would fail utterly and need completely rewriting. It could be done, but the manpower requirement is not trivial.
<h3><em>Addendum 2</em></h3>
<p>There is a templating engine <a href="https://mozilla.github.io/nunjucks/">Nunjucks</a>
which is a port to JavaScript of the Django templating system we use
(via <a href="https://palletsprojects.com/p/jinja/">Jinja</a> - these are the same people who do Flask). This would be an obvious thing to use if we needed to go in that direction.