f METHOD_NAME(self, district, geom):
  try:
    DistrictGeom = DistrictGeoms.objects.get(district=district)
    DistrictGeom.geom = geom
    DistrictGeom.save()
  except ObjectDoesNotExist:
    DistrictGeom = DistrictGeoms()
    DistrictGeom.district = district
    DistrictGeom.geom = geom
    DistrictGeom.save(