Kung FuKung Fu

Fujian White Crane Kung Fu

ZopeZope

What I have and am doing with Zope

PhotosPhotos

Photoalbum, both old and new.

ReceptsamlingenReceptsamlingen

In Swedish only. About my "Collection of Recipes" website.

Contact meContact me

My contact details and how to contact me.

  Mobile version of this page Mobile version of this page

RSS

Hot topics

by Joćo Marcus: Tell your boss you're taking more time developing the application because ...

Django vs. Java

by Julio Schwarzbeck (Speedbird): Totally agree with you there, I decided to take on django head-on, Zope is ...

Another brownie point for Django

Old entries


September, 2008
Why we like Obama, short answer: his speeches
Accessible UK Train Timetable

August, 2008
Kalle Kappner - Opeth and Pain of Salvation piano tribute
Weird Asia News
Anti-McCain propaganda videos
That should last a couple of weeks

July, 2008
June, 2008
May, 2008
April, 2008
March, 2008
February, 2008
January, 2008
2007
2006
2005
2004
2003

 

You're viewing blogs from Django only.

View all different categories

14th of November

How to unit test the innards of a Django view function

Seconds ago I got this running and haven't yet fully understood what I've just done but the results are exactly what I need and this is going to be great.

Basically, in Django you have views like this:

 def _render(template, data, request):
    return render_to_response(template, data,
              context_instance=RequestContext(request))

 @login_required
 def club_page(request, year):
    variable1 = year / 4
    variable2 = variable1 * 2
    return _render("foo.html", locals(), request)

Now in my unit tests I don't want to have to call the view function and then have to dissect the resulting HTML just to figure out if the view function prepared the correct variables. So, here's my solution to this problem:


>Read the whole text (410 more words)

25th of October

Django vs. Java

http://groups.google.com/gr...sg/117da64943e3f64b 

From the django-users mailinglist which I'm becoming more and more helpful in:

 > Could you share approximately how big your project is? I know it's
 > hard to find a real measure for this, but how about number of database
 > tables?

 A project I worked on over the summer used a Database that was 130
 tables, and getting 1gb updates every 2 minutes. I was witting a new
 web app to do calculations on the data and the company wanted to use
 Java since thats what they knew best and had spend huge amounts of
 money (1 mil +) to support with Sun Servers, and such. But I knew
 python and django would be a better fit for this particular app, but
 the boss wouldnt listen. So we had 10 Developers working on the Java
 version (Including me) and over 3 months we got it about 85% done,
 though it had no unit tests. During the same three months, I worked on
 my own time after work and basically had no life for the whole time, I
 was able to get the web app 100% complete with unit tests. That
 convinced my boss that Django was a good fit.

 The site is an internal app that I cannot give access to (And I
 actually had to get permission to give what info I have), but I can
 say that Django is a suitable framework for what you are looking for. 

Christ! 10 developers and no unit test!? Someone should remind them that you don't write unit tests for your bosses pleasure but for your own sanity and productivity.

I know that this quote is totally unscientific since Dj, as he says, can't back it up but it's a story interesting enough.

15th of June

Another brownie point for Django

http://groups.google.com/gr...d/3ffff001dd30fbae# 

Another brownie point for DjangoI've been working with Django a lot lately and while I can't contribute to the code base until my project is done, I can contribute money.

Been browsing the Django mailinglist and found this guy (link above) and some other people saying they're willing to donate money towards the OS effort that is Django. That's nuts and is a failed practice but it does mean a lot. Zope had this about 4-5 years ago too but that was then. Clearly the heat is all on Django (and Rails admittedly) at the moment. Well done to all involved!

I've been doing quite a bit of Django this weekend and this instant quick rush I got from getting started has gone off and now starts to become just normal trudging. At the moment it's the templating language that annoys the hell out of me.

In conclusion: Today Django won another point in the race for my attention.