Tech Talk

Linux, Python, E51, Scripting…

Archive for the ‘django’ Category

My Second Django App

without comments

Yesterday, I completed my second django application. I still don’t want to say I know django, but this time around I learnt quite a bit. This app is for a friend of mine working in one of those big outsourcing firms. I guess I ll post the code for download, once he okays the application. He has already agreed to that. After all, I want to keep that opensource.

Some very interesting learnings from the code are the newforms library from django 0.96. I had about 15 fields in the model and had to generate select boxes with validations. If I did it with the django I knew so far, I’d never have completed. newforms just worked magic. The other was using the calendar from the admin interface, for DateField, in our code. I took the code from this snippet.

The code has some ugly hacks. You’ll guess it at the first look. I ll fix them over the weekend, if I find some time. Already, last week had been least productive here. The only thing that even worked was this django app. So, I won’t get back to this until some of the other more important ones are completed.

There is one more useless detail that needs to go into this – the license. I haven’t decided on one yet, but since I want it to be on my profile, I ll keep it something like BSD or GPL2.

Blogged with Flock

Tags: , , , ,

Written by abiya

January 22, 2008 at 3:34 am

Posted in django, python, technical, web

My First Experiments With Django

with 2 comments

Funny way to call this post! I started learning about django about a month back. My first exposure to this genre of tools was about a year and a half back, when I tried to do some ruby on rails work. The idea didn’t kick off and I kinda didn’t have the patience to understand how RoR worked. At that time, I was not comfortable with ruby. I still am not, but thats a different story.

I started practicing python roughly about two years back. I call it practicing, because if you are some programmer, then python is probably a week of learning. At least it was so with me. But I never managed the web end of python and I did not need it either. Last week, I needed to quickly build a small application to hold all my research work : thought blog, article repo, and an interface to link the two. It was also about the same time that my guide came up with some turbogears project. I got to see the code and found it interesting. In fact the kid templating language in turbogears sort of reminded me of a templating engine called velocity that sakai used to use. I am not following sakai too closely to say if it still is!

Enough of that history. As I started trying turbogears, I remembered reading of django. So, I just stopped turbogears and started django. And my first app is already out in exacly two working days. Whoa, the last time I ever rolled something like that was when I had to meet a deadline and was working on php. This time, there was no deadline, and the actual code that I wrote is far less compared to what I wrote when I did the php work. Ok, that was unfair because the php application was not running a django-like framework. Of course, my main application is still out there untouched. Wondering if I should give turbogears the try! Lemme see which one gets the better.

Thoughts?

Written by abiya

August 22, 2007 at 4:34 pm

Posted in django, python, technical, web