Django Changed The Game

It all started with a pretty ordinary project request from our Parks & Recreation department – “we want to be able to enter/edit scores for our softball games.”

So, like any good developer, requested a meeting so I could really understand what was going on… it boiled down to this kind of these database entities:

teams
fields
leagues
venues
scheduled games
completed games

Here’s a more traditional view of the design: (click it for a full view)

Keep in mind, only about four or five people (max) need to be able to have CRUD abilities with this data.

However, designing a system like this with PHP would be pretty time consuming to say the least. Even with my nifty little utils and db classes that I tout around.

Stevo had been ranting and raving about Django, specifically it’s administrative interface. So, I gave it a try. Luckily, I had been intending on doing this for some time. My server at home was ready to roll – Django was installed and I was ready to dive right in. A few hours later and with the guidance of Stevo, my model was made.

The source is simple. Python was very intuitive, except for a weird placement of a tuple ( [[ here it was ::: None, {‘fields’: (‘name’,)}),) ]] but BAM. The administrative interface was done before lunch.

PHP is unable to compete with this rapid administration capability. Now to get this put on our production server…

Advertisements

About andyhillky
I'm cool.

2 Responses to Django Changed The Game

  1. I agree, the dictionary within a tuple within a tuple creates some nasty syntax. You can also do a little trick of putting editable=False in the fields you don’t want to show up.

    Glad to see you using Django.

  2. Randolph says:

    Didn’t you already have some softball related development experience? I hope you didn’t have a minor stroke when you got that request.

%d bloggers like this: