Resistance django code