Rewrite of

Jonathan McDowell noodles at
Thu Jun 18 16:35:14 UTC 2015

So, as mentioned at the board meeting this month I have been working on
a rewrite of For those that don't know this is a
PHP webapp with a PostgreSQL backend that was mostly written 10+ years
ago. I've been "maintaining" it for the past few years, which has mostly
been fixing it up when PHP upgrades have broken things and cleaning up
the worst of the security holes that I noticed.

Various things could do with improvement, but at this point the code is
a bit old and crufty (I had to hack up enough WML to get what was in SVN
transferred to git and actually matching what we're running), I'm not a
PHP developer and the SPI sysadmin team would really prefer it to be
written in something else.

Enter the rewrite. It's in Python using the Flask web framework. I
looked at Django, but as the members website is largely about the state
of the user/member it turned out to involve a lot of overriding of user
classes so the benefits were mostly lost. It has been designed to make
use of the current database structure rather than requiring a major
changeover, and is targeting a Debian 8 (Jessie) platform.

Improvements so far:

 * Unified member + voting sites (previously different code bases using
   the same DB backend)

 * Display of active votes on initial login page

 * Clearer indication when a new member has not yet completed the email
   verification check.

 * Better checks on contributing member applications (like, ensuring
   the email check is complete and there some actual data on the form).

 * Style matches main website.

At present the code is living on gitlab; it will move to the SPI git
repo when I get round to asking the admin team to create one, but I
thought it worth opening it up for people to look at before it actually
went live:

I am aiming to get this live before the election in July; ideally by the
end of June to give some time to bed down fully. There still some more
work I feel needs done first, but constructive criticism is welcome.


  "The best thing about Debian is  |  .''`.  Debian GNU/Linux Developer
    that it's boring." -- Peter    | : :' :  Happy to accept PGP signed
              Corlett              | `. `'   or encrypted mail - RSA
                                   |   `-    key on the keyservers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <>

More information about the Spi-general mailing list