Commit 1d76ca5d authored by SANCHIT JAIN's avatar SANCHIT JAIN

added date time picker

parent 582642c8
......@@ -31,5 +31,9 @@ VISIBILITY_CHOICES= ('1980', '1981', '1982')
class TestForm(forms.ModelForm):
class Meta:
model = Test
model = Test
widgets = {
'expected_time_for_completion': forms.TimeInput(attrs={'type':'time'}),
'start_time': forms.DateInput(attrs={'type':'datetime-local'}),
}
exclude = ['test_ID', 'ownership']
\ No newline at end of file
This diff is collapsed.
......@@ -30,7 +30,7 @@ class Test(models.Model):
visibility_student = models.CharField(max_length=20)
ownership = models.CharField(max_length=20)
expected_time_for_completion = models.DurationField(blank=True)
start_time = models.DateTimeField(auto_now=False, auto_now_add=False)
start_time = models.DateTimeField(auto_now=False, auto_now_add=False,blank=False)
max_marks = models.IntegerField(null=True)
# class TestQuestions(models.Model):
......
......@@ -8,7 +8,6 @@ Create Test
{%endblock%}
{%block body%}
<h1> You CAN CREATE A Test HERE prof {{username}}</h1>
......@@ -21,7 +20,7 @@ Create Test
<!-- <ul> -->
<form method="POST" action="create_Test">
{% csrf_token %}
{{ TestForm }}
{{ TestForm.as_p }}
{{TestForm.errors}}
{{TestForm.non_field_errors}}
{%for question in questions%}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment