I have been helping a friend with a website and it, like Topsy, just growed. It went from being manageably small (not too many pages) to large enough to be a problem (too many pages). Think it doesn't sound so bad? Imagine having to fix the copyright date on each page. That's not a good example because I was careful to use a standard layout.
Obviously the solution is to use templates but I didn't want to edit the content and add the template on my machine and upload everything so I wanted server-side templating (as opposed to rendering the pages client-side and uploading them, like they do for python.org).
My preference is to use Python for, well, just about any reason and then it hit me! Use Django! Or aanother framework, after all there are 80+ at the last count. But use Django! It's sexy! The voices in my head finally convinced me and I sketched my requirements:
I wanted
- really straight-forward templating
- WYSIWYG editing in the browser so the client can fix the content (if they want)
- access control (so bad people don't do bad things)
- a well-explained system with a user-base
- ease of implementation and support (this should have been nearer the top of the list)
- Simple urls, somehow mirroring existing URLs. Don't want to edit lots of pages.
After I fixed the problem where TinyMCE decided to rewrite URLs (wanted to leave that to Apache to solve number 6), it was all uphill to the finish line. Apache rewrites most URLs to send them to django, except for the fixed asset stuff (like CSS, images, forms for download etc).
What I may do, for a giggle, is have Django write a copy of the rendered page to the filesystem and server all content as static. Hm.. maybe not. What might be good is to version the pages - add a post-save so that we keep some amount of history.
No comments:
Post a Comment