Tag Archives: Python

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.

Now riding the Python

All aboard! Welcome to my new improved blog. I’ve rewritten my blog in Python using web.py. It took me a couple weeks to get everything up and running the way I wanted, but there’s still many more features to be added. I guess you could consider this version 0.1 of this blogging software. I have more to post about web.py, but I’ll save that for a later day.

You may also notice the layout is slightly different from my previous blog. I haven’t gone for a total revamp yet, but I cleaned up the layout a bit so that there’s more area for content.

So welcome back, and sorry for the delay. After upgrading Rails on my server, typo (my previous blogging software) broke, so I decided to write my own software and learn Python and web.py at the same time.

Update April 12, 2013: Since using web.py, I moved to Django, and now I’m back to PHP and WordPress. So I’m no longer riding the Python.