Tag Archives: Django

Django Upgraded

I finally took the time to upgrade to Django 1.0.2 and migrate my blog to the new release this weekend. Django 1.0 has a lot of improved features, including an upgraded comment system which has allowed me to re-enable comments on my blog.

There was a few speedbumps while upgrading, but everything is well documented at djangoproject.org so it wasn’t too bad.

From nothing to something with Django

Recently I published a new version of my site, including this blog. The entire site is now powered by Django. For those who don’t know, Django is a web framework written in Python and I have been toying with it for a few months. Feeling fairly comfortable with most aspects of Django, I set out to rewrite my blog… again… from scratch. As I worked on the redesign, I monitored how long each task took me. Here are my results:

  • ~45mins: Getting my rough models set up. I started with only articles and tags
  • ~45mins: Setting up rough views for articles. Listing all articles, displaying article details
  • ~20mins: Adding Django’s basic comment system to the articles
  • ~15mins: Integrating a JavaScript Markdown implementation into the admin site for writing articles
  • ~15mins: A few touch-ups to allow inactive articles and comment filtering
  • ~30mins: Adding pagination to the article list
  • ~30mins: Setting up Context Processors to display information in the sidebar on every page (tags, latest post, etc)
  • ~15mins: Going through and tagging all my articles (I hadn’t previously done so)
  • ~40mins: Setting up my RSS feeds. I now have feeds for latest posts, and latest comments
  • ~2hours 20 mins: Moving my entire project to my production server and configuring apache.

Total Time: ~6.5 hours

I’m not sure whether you would consider that good or bad. I feel like it went pretty well, however some tasks took longer than I’d hoped, mostly because of something tiny and stupid or because I would have to refer to documentation. For example, I used subversion for version control and when I deployed my blog, I had to install subversion on my production server. This added some unexpected time to deployment. I also hadn’t used some of the features such as comments and RSS in Django previous to this little project.

Overall I’m pleased with how clean Django is. It really emphasizes clean object-oriented design. There are lots of built-in features that can be really helpful, however it takes a while to learn them all or even discover them. The documentation for Django is alright, however I’ve found that the DjangoBook is a very good learning resource. I even ordered the hard copy to have at my side while I code.

Anyway, enjoy the new blog. I finally got tags working properly and added a new feed for comments. Let me know what you think.

Five Things I Recommend

It’s autumn 2007 and, as always, I have a handful of things that are currently filling my life with joy. I’d like to take a minute to list 5 of these things and recommend them to you. I’m sure that some of these recommendations will eventually fade off my top 5 list, but as of right now, you should try these:

  1. Django. Django is a web framework written in Python. I’ve been experimenting with a couple Python web frameworks recently, and over the last month, I’ve written a couple small applications using Django. The installation is easy, development is fast and support is plentiful.
  2. French Onion Soup from M&M Meat Shops. These were recommended to me by my brother, Nick. They are amazing. They come completely frozen, and you put them in the oven. If you like French Onion Soup, you have to try these.
  3. Guitar Hero. As many of you already know, Guitar Hero is the game that revived my Xbox 360. If you still haven’t played this game, you should find someone with it and give it a try. Guitar Hero III comes out next week, and you can be certain that I am going to buy it.
  4. Plant bulbs. Fall is the time of year to plant spring flowers. There are tons of types of flowers that you plant now, and they will be the first ones to burst through the soil after the snow melts. Tulips, Daffodils and Crocus are among the many great varieties of flowers to be planted now. Check with your local garden centre to see which ones would be best for your garden.
  5. All-you-can-eat-sushi. I’ve gone twice in the last month. I’ve always enjoyed sushi but I’ve never really had the chance to venture out of my comfort zone when ordering. That was, until I went with co-workers for all-you-can-eat sushi. This is not like the typical buffet as you would find in Chinese restaurants. At most A.Y.C.E. sushi restaurants, you order off a menu, and each dish is made fresh for you. With a large group of people, you have the chance to try a lot of new dishes and things you wouldn’t normally order on your own. Another added bonus is that you never really feel full while eating sushi, so you can just keep eating and eating.