Changes between Initial Version and Version 1 of Ticket #18418


Ignore:
Timestamp:
Jul 8, 2012, 2:33:39 PM (12 years ago)
Author:
Aymeric Augustin
Comment:

Replaced the link to a paste site with the actual content, in case the paste site disappears.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18418 – Description

    initial v1  
    1 Suppose we have this forms.py: http://codepad.org/HIt9bBtA
     1Suppose we have this forms.py:
     2
     3{{{
     4class SubmitButtonField(forms.Field):
     5     # here we write a custom field....
     6
     7class Editor(forms.Form):
     8    script_name = forms.CharField(max_length=60, min_length=1)
     9    view_level = forms.ChoiceField(widget=forms.widgets.RadioSelect, choices=VIEW_LEVEL)
     10    text_box = forms.CharField(widget=forms.widgets.Textarea, required=False)
     11    save_button = forms.SubmitButtonField(required=False)
     12
     13    # notice save_button above....
     14}}}
    215
    316Notice that `save_button` has an error. I accidentally added `forms.` in the beginning. This is invalid, and Python will raise exception.
Back to Top