parameters: (layer)
docstring: Check if shapefile for a given layer has valid column names.
          If not, try to fix column names and warn the user
docstring_summary: Check if shapefile for a given layer has valid column names.
          If not, try to fix column names and warn the user
docstring_tokens: Check if shapefile for a given layer has valid column names . If not try to fix column names and warn the user
function: def check_shp_columnnames(layer):
      """ Check if shapefile for a given layer has valid column names.
          If not, try to fix column names and warn the user
      """
      # TODO we may add in a better location this method
      inShapefile = ''
      for f in layer.upload_session.layerfile_set.all():
          if os.path.splitext(f.file.name)[1] == '.shp':
              inShapefile = f.file.path
      if inShapefile:
          return fixup_shp_columnnames(inShapefile, layer.charset)
function_tokens: def check_shp_columnnames ( layer ) : # TODO we may add in a better location this method inShapefile = '' for f in layer . upload_session . layerfile_set . all ( ) : if os . path . splitext ( f . file . name ) [ 1 ] == '.shp' : inShapefile = f . file . path if inShapefile : return fixup_shp_columnnames ( inShapefile , layer . charset )