--- a/OSSEval/analysis/views.py
+++ b/OSSEval/analysis/views.py
@@ -7,7 +7,7 @@
from django.views.generic import ListView
from xml.dom import minidom
-from forms import AnalysisForm, UploadFileForm, ImportChoice, MyModelForm
+from forms import AnalysisForm, UploadFileForm, ImportChoice
from analysis.models import Analysis, Instance, UploadedFile, Answer, Methodology, MethodologyVersion, Question, Page
#from methodology.models import Methodology, MethodologyVersion, Question, Page
from OSSEval.utils import xmlMinidom, TrivialJSONEncoder, SearchEngine
@@ -228,17 +228,3 @@
return HttpResponseRedirect(reverse('analysis_list'))
-def create_a_my_model(request):
- if request.method == 'POST':
- form = MyModelForm(request.POST)
- if form.is_valid():
- # save the model to database, directly from the form:
- my_model = form.save() # reference to my_model is often not needed at all, a simple form.save() is ok
- # alternatively:
- # my_model = form.save(commit=False) # create model, but don't save to database
- # my.model.something = whatever # if I need to do something before saving it
- # my.model.save()
- else:
- form = MyModelForm()
- c = { 'form' : form }
- return render(request, 'analysis/template.html', c)