Halfapenguin.com
django

From Django To Rails Prelude:Time To Look at Rails

21:28, 13 May 2009

So more than 4 years after first looking at Django, and thinking it was better than a bread knife that toasts your bread while it is sliced... it still seems less popular than its slightly younger and scruffier sibling, Ruby on Rails.

I have to say there is a touch of betamax feeling here, i'm a python programmer at heart, and Ruby itself seems to be messy and inelegant, combine with it more than a few misgivings about the way rails does things, i felt sure that Django would eventually emerge supreme, as the better thought out and more sophisticated framework. That happy day has yet to come, and given that RoR seems to be in vogue in the job hunting circles, i may need to swallow my pride.

In the past i have experimented with RoR, i've even got somewhere with it, but still it did not appeal to me. This time i am going to try to go in with a clean(ish) slate, an entire 1.0 of difference separates this RoR from the old version, and its just possible i may find a new framework awaits me.

In an effort to record my RoR experiences, i'm going to attempt to do semi-regular blog postings on the subject. Also to try to prevent my prejudices sneaking in, i'm going to set myself some ground rules...


  • I will try to be as forgiving of RoR as i am of Django's little foybles (they do exist)

  • I will work on improving my Ruby skills, and endevour to be able to at least examine the Rails source

  • I will attempt to keep up with the latest news in the RoR community

  • Once i have become re-familiar with RoR, i will use it to develop on of my upcoming projects. its the only way to get good at something is to use it

  • I will find a use for blocks... people rave about them...popular opinion may not always be right but see whats doable

Django 1.0 compliant

05:12, 04 Sep 2008

Django 1.0 has now been released, and now my django based blogging software has been updated to meet the changes.

I've also updated the djwhitelist application which i'll get round to releasing very soon, once i've tested it with the latest django openid implementation.

I'm not sure how i feel about the changes in Django 1.0 with the structural changes, it may break my like of having all the details in one place, however design purity would require it to be separate.

The next project will be written with the intent to explore a few of the new features in Django 1.0 including the new file handling and caching facilities. I'll do a write up once i've done some more digging.

URGENT - django shell fix

23:37, 18 Nov 2007

I found this through The O-Reilly blog

I was having a huge headache with the django shell, or maybe that was the flu (4 days and counting, whoever took my immune system i want it back....) but either way Apple has released a fix that makes it work again (and its now been updated, Yippeeee!

The problem was no tab-completion in the ipython shell for django, and that is a terrible headache for anyone used to this wonderful feature. The fix involves a couple of lines added to your ~/.ipython/ipy_usr_conf.py file.

Add these 2 lines to the end of the main method (its not totally clear on the site with the fix i'm sad to say).
import readline
readline.parse_and_bind ("bind ^I rl_complete")
(If you don't know how to do this, you shouldn't really be editing these files)
Any problems, leave a comment...(but please direct credit to the discoverer of the fix)