Just Digital

Stop the music and go home

Migrating your application from Django 1.2 to 1.6

Django 1.6 is out as of 6th November 2013 and I've managed to earn myself enough spare time to have a look.

If it ain't broke, don't fix it

Why upgrade? Here's my two big reasons:

  1. Security. There have been 25 security releases issued since I first built this site back in October 2011
  2. I'm probably going to have to start upgrading our applications sometime soon so I thought I'd bite the bullet early on with a smaller project

Doing things in a Pythonic way pays off :) If I may I'll urge you to seek out the conventions and best practices. just-digital.net (codenamed jdblog) implements about 5 model classes and 5 views. It also has several context processors (for tweets and forms) and a middleware class for breadcrumbs. I managed to migrate the entire application without rewriting a single bit of code (not including settings.py)

The biggest issue was obviously the new project layout. I figured it would be faster and cleaner to start a new project using $ django-admin.py startproject - then copy-paste the apps, and adjust the settings.py accordingly. Doing it that way only cost me 2 hours.

Deprecated discountenance (all since 1.2)

  • mod_python support
  • Function-based generic views (django.views.generic.create_update, django.views.generic.date_based, django.views.generic.list_detail, django.views.generic.simple)
  • Test client response template attribute
  • DjangoTestRunner
  • Changes to url and ssi
  • Changes to the login methods of the admin
  • reset and sqlreset management commands
  • GeoDjango
  • CZBirthNumberField.clean
  • CompatCookie
  • Loading of project-level translations
  • PermWrapper moved to django.contrib.auth.context_processors
  • Removal of XMLField
  • Old styles of calling cache_page decorator
  • Support for PostgreSQL versions older than 8.2
  • Request exceptions are now always logged
  • django.conf.urls.defaults
  • django.contrib.databrowse
  • django.core.management.setup_environ
  • django.core.management.execute_manager
  • is_safe and needs_autoescape attributes of template filters
  • Wildcard expansion of application names in INSTALLED_APPS
  • HttpRequest.raw_post_data renamed to HttpRequest.body
  • django.contrib.sitemaps bug fix with potential performance implications
  • Versions of Python-Markdown earlier than 2.1
  • django.contrib.localflavor
  • django.contrib.markup
  • AUTH_PROFILE_MODULE
  • Streaming behavior of HttpResponse
  • django.utils.simplejson
  • django.utils.encoding.StrAndUnicode
  • django.utils.itercompat.product
  • cleanup management command
  • daily_cleanup.py script
  • depth keyword argument in select_related

For more information about version see release notes at 1.3, 1.4, 1.5, 1.6

Vagrant box Ubuntu 12.04 (Precise) in a bash script

I discovered Vagrant recently,  and quickly fell in love as I realised it power and awesome.  

It's basically a wrapper over Oracle's VirtualBox (which by it's self is a great tool) but when combined with the Chef/Puppet scripts a whole new world of automation unfolds.

It will take a little time to set up your environment initially, but once it's set up it's set up for life.

Now where to find a small Ubuntu Server 12.04 vagrant box that I can trust?  Well, I couldn't find any (not even this site).  However I did find a fantastic script by Carl Crafoord that packages up a Vagrant box in a bash script.

The only teeny tiny issue is that it was build for a Mac, so I had to port it onto Ubuntu 12.04 Desktop edition and also changed it to download the ISO via torrent (transmission-cli), which is way, way quicker.


$ git clone https://github.com/just-digital/vagrant-ubuntu-precise-64.git

I've tested it but only on my local PC.  Please let me know if you have any issues.


Django developer Auckland

Developing on Django in Auckland, like a boss!  

I choose Django because I've fallen deeply in love with Python.  Django, was an easy choice because it makes web development so damn sexy.  I also fully endorse and encourage with Django philosophies

To add a bit of background;  I've been coding for over 10 years.  I was born and raised in South Africa and spent time in the UK.  I'm now living in Auckland, New Zealand together with my gorgeous wife and wee fella.

I do all sorts of coding, Django, Python, PHP, JavaScript, jQuery, CSS, HTML.  I practise coding standards and semantics. I love little gadgets and mind blowing ideas. 

I work full time at Yellow Pages Group in New Zealand but I am always available for some freelance jobs. How can I help with your project?


Django, python, through Vim.

The gist of it

The project idea came up today with the potential use for a "Business name" to domain name matcher.  So I put together a quick-and-dirty Python script to do just that:

Saying no to 1 post blogs

A fence post in the desert Image courtesy of Kuranes

The Internet has way to many single-post blogs.  Unfortunately, I couldn't find any amazing stats or info-graphics to prove this BUT we all know they are there (I have contributed at least five/six so far).

I refuse to let this blog fall to the same list of lonely, forgotten, can't-be-arsed weblogs.

And so I am motivated to write this second post, thus contributing to the web's cacophony of 2-post blogs.


Digital Agency in London

Bye bye my love. 

Don't really need a "Digital Agency in London" website anymore, since I don't live in London, and don't really run an agency either.

So I've converted it into a blog instead (It didn't take long, only a few hours - promise.  Built it on Django). 

I'll probably use this space to rant and rave and complain.  I might even put up some useful things.  Ah, who I'm kidding.

(*pst.  I'm still available for some freelance work if you need? Get me here or here.)

XKCD says it best.
  • Hiya!

    I'm a friendly local developer in New Zealand turning coffee into code and talking about it all here.
    - Kevin

  • Contact me

    Need some freelance or contract work, hire me for small or medium jobs. Contact me here.

  • Categories