[Expo-tech] the fossil bits of JavaScript in expo troggle: JSLIB_URL
Philip Sargent [Gmail]
philip.sargent at gmail.com
Thu Mar 18 22:02:42 GMT 2021
OK expo website people. I am starting on the 10-15 pages of faults and glitches and whatnot that should be done on the expo website software.
Who knows anything about the fossil bits of JavaScript that used to be accessed at http://expo.survex.com/javascript/... which is configured in the Apache config and also the Django JSLIB_URL constant, but which point to various jquery things which are not in any of the repositories and are not on the server either – and so not actually loaded or used.
Simplest example:
javascript/jquery-form/jquery.form.min.js
used to be imported into pages showing a survex file, e.g.
http://expo.survex.com/survexfile/caves-1623/107/antigrav.svx
but the import currently fails. But the HTML page seems to work fine! This is the survex file online display & edit page.
So what was it meant to do, so what functionality is invisibly missing ?
The import of JSLIB_URL/codemirror/codemirror.min.js in the same page also fails. I presume this is a better editor, and may even have survex syntax colouring, but the actual code we used to use has been lost in history.
Elsewhere there are mentions of MEDIA_URL/CodeMirror-0.62/ but none of that is any of the repos either.
Context: on the server today JSLIB_URL points to http://expo.survex.com/javascript/ which Apache aliases to /usr/share/javascript/ which, on the sever, has subdirectories
/jquery
/jquery-ui
/CaveView
/openlayers
and some others, but not
/jquery-form/
I presume these are what come “as standard” with Debian Buster on the server. On my copy of Ubuntu 20.04 on my home machine I have the same /jquery/ (and the same version: 3.3.1) but I don’t have /jquery-ui/ or any of the others. I have found no relevant installation instructions.
Currently none of these javascript imports are under any kind of version control. Neither are any of them documented whatsoever.
Documenting what is supposed to be there would be a start.
Philip
From: Philip Sargent [Gmail] [mailto:philip.sargent at gmail.com]
Sent: 27 February 2021 01:02
To: 'Expo Nerding'
Subject: Expo website: troggle updating
Hi,
OK I am about to re-engage with the Expo website updating. The job is just the Django version <http://expo.survex.com/handbook/troggle/trogdjango.html> :
o The server is on Debian Buster (10.8) and I presume Wookey is not planning on upgrading that before next year but no hurry.
o We are using python 3.7.3 which is in date and will have security updates until mid-2023
o The troggle code is on Django 1.11 which is out of date and no longer getting security updates. The initial need is to migrate to Django 2.2 LTS which will be in-date until Spring 2022. This is compatible with python 3.7.
I have just finished bringing the CU Yachting Club website up from python2.7 & Django 1.5 to python 3.5 & Django 2.2, which is a much larger job than the Expo website. (It is stuck at python 3.5 because of old plugins: PayPal, Raven link, captchas, Mailman link, Trac link and image management.)
So I should do the Expo Django update while this is all fresh in my mind. I will need to remove the registration plugin and move to the Django in-built user system which is now more than adequate for our needs. I am also now much more adept at writing test suites for Django so I will do more automated testing.
The CUYC python was written by a professional Django developer (in 2009) and so uses a much wider range of programming features than we use. I have learned a lot. (My wallpaper is peeling from all the swearing.)
I remain firm in my belief that we should migrate away from Django and replace as much as possible with plain python. Django is just too big for amateurs now. This rewriting can be done a chunk at a time: logbooks, then survex, drawings, QMs and so on..
We can do import + static publish . No need for multi-user database now that importing everything takes 2 minutes.
Philip
CUYC:
14,674 lines of non-comment, non-empty python.
That is > 2x the size of the CUCC Expo django codebase
and 15,658 lines of non-empty HTML & scripts in the /templates/ too
That is 6x as big as CUCC Expo - but mostly static.
Unlike CUCC Expo, the CUYC system <https://www.cuyc.org.uk/training/> is used every week to construct ~35 sailing trips a year and to enrol students in practical classes and theory courses – taking payment via PayPal and authenticating junior members of the university via the Raven plugin. So it is vital to the everyday functioning of the club. It very significantly reduces the workload on organisers. It will be staying on Django indefinitely and is hosted by SRCF. The club turnover is more than £50k a year.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wookware.org/pipermail/expo-tech/attachments/20210318/03fa4999/attachment.htm>
More information about the Expo-tech
mailing list