Created
November 6, 2012 01:35
-
-
Save ralphbean/4021896 to your computer and use it in GitHub Desktop.
Identifying a bug in tw2.{dynforms,core} 2.1.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| ''' | |
| Created on 13.04.2012 | |
| Ported to tw2 on 25.05.2012 | |
| @author: moschlar | |
| ''' | |
| import tw2.core as twc | |
| import tw2.forms as twf | |
| import tw2.dynforms as twdf | |
| import tw2.bootstrap.forms as twb | |
| import tw2.tinymce as twt | |
| #from sauce.widgets.lib import FloatValidator | |
| class JudgementForm(twb.HorizontalForm, twdf.CustomisedTableForm): | |
| title = 'Judgement' | |
| assignment_id = twf.HiddenField(validator=twc.IntValidator) | |
| submission_id = twf.HiddenField(validator=twc.IntValidator) | |
| class annotations(twdf.GrowingGridLayout): | |
| line = twf.TextField(validator=twc.IntValidator, css_class='span1') | |
| comment = twf.TextField(css_class='span6') | |
| #Autosize('comment', help_text=u'Comment on the above source code'), | |
| comment = twt.TinyMCEWidget(placeholder=u'Comment on the above source code', | |
| css_class='span7', rows=6) | |
| #Autosize('corrected_source', help_text=u'Paste your corrected source code here'), | |
| corrected_source = twf.TextArea(placeholder=u'Correct the above source code', | |
| help_text=u'It is currently not possible for you to run the test cases '\ | |
| 'with this corrected source code. Sorry!', css_class='span7', rows=10) | |
| grade = twf.TextField(placeholder=u'Grade this submission', | |
| validator=twc.IntValidator, css_class='span3') | |
| # Go to localhost:8080/judgement | |
| class judgement(twf.FormPage): | |
| title = 'Judgement page' | |
| child = JudgementForm | |
| if __name__ == '__main__': | |
| import tw2.devtools | |
| tw2.devtools.dev_server() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment