I think it's much more readable if you don't use the inline version for the if statement unless it can "stay" on one line: 
<code>old_instance = None
if filer_img.pk:
&nbsp;&nbsp;&nbsp;&nbsp;old_instance = FilerImage.objects.get(pk=filer_img.pk)
</code>