--- a/OSSEval/analysis/forms.py
+++ b/OSSEval/analysis/forms.py
@@ -1,18 +1,23 @@
-from django.forms import ModelForm, Textarea
+from django.forms import ModelForm, Textarea, HiddenInput
from django import forms
from django.forms.widgets import RadioSelect
-from models import Analysis
+from models import Analysis, MyModel
class AnalysisForm(ModelForm):
class Meta:
model = Analysis
fields = '__all__' #('name', 'description', 'comment', 'weight_scenario')
+
+# fields = ('id', 'name', 'description', 'comment', 'user_login', 'methodology_version')
widgets = {
'description': Textarea(attrs={'cols': 80, 'rows': 5}),
'comment': Textarea(attrs={'cols': 80, 'rows': 5}),
+ 'id': HiddenInput()
}
-
+class MyModelForm(forms.ModelForm):
+ class Meta:
+ model = MyModel
class UploadFileForm(forms.Form):
file = forms.FileField(label='Select a file')