code: def redirect_territory(level, code):
      
      territory = GeoZone.objects.valid_at(datetime.now()).filter(
          code=code, level='fr:{level}'.format(level=level)).first()
      return redirect(url_for('territories.territory', territory=territory))
docs: Implicit redirect given the INSEE code.
  
      Optimistically redirect to the latest valid/known INSEE code.