Raspberry Pi
: 03 mar 2013 13:25
Hi Peter,
I've been busy lately so I only found time to check out your work just now. Looks very good and just works so I pulled it.
The auth.py module is copied from the cherrypy wiki, I guess that the login and logout page handlers can be moved to pellmonwebb.py (really should rename that... somehow I managed to spell web wrong..) and make a mako template out of get_loginform. By the way, I didn't really choose mako because of some preference of mine or any technical quality, but rather since I am completely new to web development I figured it was a waste of time to even try to evaluate the numerous options there seems to be so I just used the first one mentioned here http://docs.cherrypy.org/stable/proggui ... plate.html... If you wish feel free to use any other. And if you feel that cherrypy is crippling you I would be open to scrapping that also, it was a really neat way to get started for a web noob like me, but I wouldn't want you to feel forced to work with it.
Steen, what do you think about adding an optional item to the config file, eg. 'persistent-db = /path/to/persistent-db', when that's present the server copies the file pointed by it over the database at startup, and copies it back at a regular (configurable) interval, and also on shutdown. Ie. just like your scripts but easier to set up. Then the user would be free to add a ramdisk and set the database to point there and set persistent-db to a location on the sd-card. I wouldn't want it to be a requirement to know how to set up a ramdisk.
/AN
I've been busy lately so I only found time to check out your work just now. Looks very good and just works so I pulled it.
The auth.py module is copied from the cherrypy wiki, I guess that the login and logout page handlers can be moved to pellmonwebb.py (really should rename that... somehow I managed to spell web wrong..) and make a mako template out of get_loginform. By the way, I didn't really choose mako because of some preference of mine or any technical quality, but rather since I am completely new to web development I figured it was a waste of time to even try to evaluate the numerous options there seems to be so I just used the first one mentioned here http://docs.cherrypy.org/stable/proggui ... plate.html... If you wish feel free to use any other. And if you feel that cherrypy is crippling you I would be open to scrapping that also, it was a really neat way to get started for a web noob like me, but I wouldn't want you to feel forced to work with it.
Steen, what do you think about adding an optional item to the config file, eg. 'persistent-db = /path/to/persistent-db', when that's present the server copies the file pointed by it over the database at startup, and copies it back at a regular (configurable) interval, and also on shutdown. Ie. just like your scripts but easier to set up. Then the user would be free to add a ramdisk and set the database to point there and set persistent-db to a location on the sd-card. I wouldn't want it to be a requirement to know how to set up a ramdisk.
/AN