Re-work Django code.