Home | Trees | Indices | Help |
---|
|
1 from django.shortcuts import render_to_response 2 from django.template import RequestContext 3 from madrona.shapes.forms import UploadForm 4 5 6 # TODO convert this to using ModelForm with a custom Django FileField 7 # For now we just stick an uploaded shapefile into a project directory 810 if request.method == 'POST': 11 form = UploadForm(request.POST, request.FILES) 12 if form.is_valid(): 13 form.handle(request.FILES['file_obj']) 14 #form.save() # if a modelform 15 #form.cleaned_data['user'] = request.user 16 return render_to_response('uploaded.html', RequestContext(request,{})) 17 else: 18 form = UploadForm() 19 return render_to_response('upload.html', RequestContext(request,{'form': form}))20
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Oct 30 11:31:06 2012 | http://epydoc.sourceforge.net |