After some requests I decided to publish my code for categories. It’s very simple. It was inspired by following articles: A "category" Data Model (note: this article uses old-style model format, it doesn’t work anymore) and Relating an object to itself, many-to-one.
from django.core import meta class Category(meta.Model): """ Category defines following fields: name - simple name of category, e.g., 'C++' full_name - full name of category, which includes names of all parents, e.
Finally we have official Django badges. Wilson Miner did a great job putting them together. I decided to use this one:
How do you like it?
If you are a fan of 80 by 15 pixels badges, don’t fret — Dave Hodder has you covered with his rendition of "Made with Django" theme. Collection of his small badges are attached to ticket #509. Check it out too.
Today is the day of new releases: OpenWrt just released new White Russian RC3.
BTW, contrary to popular belief, it’s not just for Linksys WRT54G. You can run it too, if you have supported hardware. I run it on Buffalo WBR2-G54.
Wow, they move fast! Go and grab Tiny MCE 2.0RC2.
Finally I added RSS 2.0 using Django’s facilities.
Default RSS feed is for my blog. Categories have two versions of RSS feed: exclusively for documents of the category, and documents for the category and its children. (I hope it is not news anymore: I have hierarchical categories.)
Update: InnoDB is in the house!
In my previous post I already complained about lack of transaction support by DreamHost. The only database option is MySQL with InnoDB engine, which doesn’t support transactions. Everybody knows that transactions are nice. So what about MySQL/InnoDB or PostgreSQL?
So I hit DreamHost forums and found several posts from DreamHost people about PostgreSQL and InnoDB:
Re: PostgreSQL rant on 06/02/05 by Jeff @ DreamHost (DH Discussion Forum Admin) Re: PostgreSQL rant on 06/01/05 by Dallas (DreamHost Head Honcho/Founder) Re: mod_proxy support on 04/07/05 by Jeff @ DreamHost (DH Discussion Forum Admin) Re: PostgreSQL on 12/03/04 by will Re: PostgreSQL rant on 10/15/04 by nate Re: PostgreSQL rant on 06/23/04 by Jeff @ DreamHost (DH Discussion Forum Admin) Re: MySQL 4, PostgreSQL on 07/15/03 by will Re: MySQL 4, PostgreSQL on 04/07/03 by Jeff @ DreamHost (DH Discussion Forum Admin) Re: transactions in mysql on 02/11/03 by Jeff @ DreamHost (DH Discussion Forum Admin) So I’ve got the impression that PostgreSQL is out for now, but MySQL/InnoDB is really close to be implemented and offered to customers.
Now this blog runs on sql:. I use MySQL as my backend. Before that I tested it locally with SQLite (so easy to install!) and MySQL.
I learned today that MySQL, which is provided by my host (DreamHost), uses MyISAM for all tables. MyISAM doesn’t support transactions. AT home I use InnoDB, which supports transactions. However the hope is not lost — DreamHost mulls over InnoDB support. But as far as I know, they don’t have an implementation schedule yet.
This site was running using locmem: caching option, which is fine for small web site. Now it runs using file:. Please let me know, if you spot any issues.
I am planning to implement sql: next.
TinyMCE 2.0RC1 is out. Take it while it’s hot! I’ve upgraded my admin pages and it looks better than previous one (duh!).
Nevertheless I see annoying flickering in FireFox. But it flickers less now.
I am not talking about multithreading problems. locmem: doesn’t have them. But it does have problems with gzip. Sometimes I see binary stuff on my screen. It looks like a gzipped web page without proper gzip encoding flag. I don’t do anything related to compression in my cache.
Is it a bug in Django’s caching? Hmm… Apparently it works properly with memcache. Can it be some bug in simple: implementation, which was a base for locmem:?