Thursday, 29 November 2007
PUT, POST and CherryPy
I spent yesterday implementing a 'PUT' of data to the COOL database, using an xml description for the updated data. This now works fine, and today I introduced authentication. The method I implemented first used 'PUT' , since i shall only be updating existing channels, however (unfortunately) html forms always send a file with 'POST' so I have since had to allow POST too. The only way I could 'PUT' a file to a RESTful address was with cURL. I'm now making the cherrypy server produce a form from the payload description so that the data can be edited in a dynamic way.
Wednesday, 21 November 2007
CSS tables, speed
I need a table which has a fixed header and scrollable content. I found a couple of links: here and here, but I get strange effects in Safari: it is difficult to make the heading columns line up with the data columns...there seems to be 2px offset between Firefox and Safari, accumulating with each column. I'll finish this today so it looks ok at least in Firefox.
The RunList application is up now, link here, with run details added in the links. One worry has been speed, and this seems to be down to pyCool. A bug was filed to look into this.
Wednesday, 14 November 2007
Python, libxml2 and run lists
So this last week I've been working on the run list as a web application. The front end is not so difficult, although I was requested to make the server side in Python; not my first choice... particularly as CERN's web server is not set up to use python as flexibly as PHP. So I run it as a python script in cgi-bin. This in turn uses my CherryPy server to retrieve xml. Then the fun begins: I am using libxml2 which is really not well documented. I'm compiling some notes on my wiki which might be helpful... difficult to believe that in the whole world there might be only a handful of programmers who have tried this.
Wednesday, 7 November 2007
RESTful Interest
I didn't write up last Wednesday or the one before, so what has happened? For a start the server where all the CherryPy stuff was based went down (hardware fault) and I didn't have a backup of my work, so that was painful. The CherryPy server and my demo application now work again, having installed them on atlmysql02 instead. I gave a presentation yesterday on this stuff, which seems to have generated quite some interest, and I started to produce a RunList web application reproducing the functionality in Richards python script.
Subscribe to:
Posts (Atom)