Package madrona :: Package loadshp :: Module forms :: Class UploadForm
[hide private]

Class UploadForm

source code

django.forms.Form --+
                    |
                   UploadForm

Instance Methods [hide private]
 
clean_file_obj(self) source code
 
handle(self, filefield_data, user)
Upload the file data, in chunks, to the media/upload/loadshp.
source code
 
write_file(self, filename, filefield_data) source code
 
check_zip_contents(self, ext, zip_file) source code
 
validate(self, filefield_data)
Validate the uploaded, zipped shapefile by unpacking to a temporary sandbox.
source code
Class Variables [hide private]
  file_obj = forms.FileField(label= 'Upload a Zipped Shapefile')
  multi_feature = True
  supported_geomtypes = ['Polygon', 'Point', 'Line']
  enforce_4326 = True
Method Details [hide private]

handle(self, filefield_data, user)

source code 

Upload the file data, in chunks, to the media/upload/loadshp. Then unpack it, read the features and return them