Saturday, April 21, 2007

Django for CMS

Well, Django is nice for building web applications, but have some drawback if you need to develop a CMS.

  1. The URL dispatcher is not much help. In a CMS you cannot determine the content of a given URL without looking inside some sort of DB which hold the content. This means that the urlpatterns structure most likely will hold a regex to an admin system and a regex to a handers for all other URLS.
  2. The above point also means that you only have 2 Django application, the page handler and the admin system. What you really need in a CMS is the ability to display different content elements in the same page.
  3. The automatic admin system is just to lame to be any help in a CMS. It's lack of features, like a integrated editor (FCKEditor / TinyMCE) or an ability to grant some users access to specific part of the admin, unability to handle record positioning by an index (move up/down), makes it pretty useless.

So, what should you do? Roll your own content mangement framework (CMF), or reuse the parts of Django which can help you?
If it had been any other language I would probertly have gone for the reuse, but the is Python, and we have all sort of nice code (fx Paste) which can be used for a CMF.

I'm I way off?

Saturday, April 7, 2007

Django

So, there is quite a few Python web frameworks to choose from these days. Thats really nice. After Guidos appraisal of Django I have been giving it a try.

After a background in ASP its something quiet different: URL's are routed to a specific function, so no need for a file per URL. Arguments can be incorporated into the URL instead of having it in the querystring. Django also have a really nice ORM so you can write code without having to use SQL.

My initial project is to build a small CMS using Django.

The system will for a start consist of the following element:

Page
- name
- parentpage

Content
- page
- data

I'll post the code when i have got something working.