diff options
author | ankitjavalkar | 2020-03-27 15:44:08 +0530 |
---|---|---|
committer | ankitjavalkar | 2020-03-27 15:44:08 +0530 |
commit | d7bc376400a610fa2760e05cfb7781050a08dc7b (patch) | |
tree | fd59c4ffa6d7def6d98283c6e6a4a0da8097f7ba /yaksh/views.py | |
parent | e8573822d3ed25306d5d2faf946633f2c17997b0 (diff) | |
download | online_test-d7bc376400a610fa2760e05cfb7781050a08dc7b.tar.gz online_test-d7bc376400a610fa2760e05cfb7781050a08dc7b.tar.bz2 online_test-d7bc376400a610fa2760e05cfb7781050a08dc7b.zip |
Allow stdio expected input to be optional and miscellanous UI fixes
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index b54461f..873c227 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -103,8 +103,9 @@ def get_html_text(md_text): def formfield_callback(field): - if (isinstance(field, models.TextField) and field.name == 'expected_output' - or field.name == 'expected_input'): + if (isinstance(field, models.TextField) and field.name == 'expected_input'): + return fields.CharField(strip=False, required = False) + if (isinstance(field, models.TextField) and field.name == 'expected_output'): return fields.CharField(strip=False) return field.formfield() |