I'm building a wedding site that contains mostly static material but has some material that's reminsicent of CMS and some material that's database-driven, too.
I surveyed the scene of Python web-frameworks and settled on Pylons for various reasons but mostly because:
I've spent 40 minutes or so fiddling with the site so far with only a
few minor issues which required me to go poking through documentation.
One of the issues is that I have a series of templates in my templates/
dir and I uncommented out the commented out code in the
template.py controller so it's like this:
from weddingwww.lib.base import * class TemplateController(BaseController): def view(self, url): from pkg_resources import resource_exists if resource_exists('weddingwww', url+'.myt'): m.subexec(url+'.myt') else: m.abort(404, "File not found '%s'" % url)
That doesn't seem to work as I'd expect. For example, if I go to
ends up as
meeting but the resources_exist returns a false
even though there's a
meeting.myt file in my templates
After fiddling with this and trying to figure out where pkg_resources is defined, I just commented the code out and changed it to this:
from weddingwww.lib.base import * class TemplateController(BaseController): def view(self, url): m.subexec(url+'.myt')
which obviously does the wrong thing if the file doesn't exist.
Had to look this up for a friend. The "text-align" css property allows you to align the value inside a form input text box.
<input type=text style="text-align:center" name="blah" value="blah">
I keep forgetting this and forgetting where I wrote it down. Irritating.
<meta http-equiv="refresh" content="0; URL=http://bluesock.org/~willkg/blog/">
Copyright 1996 to 2013, Will Guaraldi Kahn-Greene, under the Creative Commons BY-SA 3.0 license
Will's Blog by William Kahn-Greene is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.