def fixup(adict, k, v):
 for key in adict.keys():
  if (key == k):
   adict[key] = v
  elif isinstance(adict[key], dict):
   fixup(adict[key], k, v)

def fixup ( adict , k , v ) : for key in adict . keys ( ) : if ( key == k ) : adict [ key ] = v elif isinstance ( adict [ key ] , dict ) : fixup ( adict [ key ] , k , v )
install django fixup if settings module environment is set .