Pastebin

Paste #3177: No description

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

class QuickSearchForm(Form):
    age_group_choices = [("A", gettext("Voksne")), ("C", gettext(u"Børn"))]
    age_group           = RadioField("age_group", choices=age_group_choices, validators=[Required()], default="A")

    #sex_choices = [("F", gettext("Kvinde")), ("M", gettext("Mand")), ("U", gettext("Unisex"))]
    sex_choices = [("F", gettext("Kvinde")), ("M", gettext("Mand"))]
    product_sex         = RadioField("product_sex", choices=sex_choices, validators=[Required()], default="F")
    mm_foot_length      = IntegerField('mm_foot_length',    validators = [Required(), NumberRange(min=0, message="FOOO")])
    mm_forefoot_width   = IntegerField('mm_forefoot_width', validators = [Required(), NumberRange(min=0)])
    #mm_foot_length      = TextField('mm_foot_length',    validators = [Required()])
    mm_forefoot_height  = TextField('mm_forefoot_height', validators = [Optional()])


---------------------

<form action="/match" method="POST" class="searchform" name="searchform">
  {{form.hidden_tag()}}
  <p>
  {{ gettext("Indtast mål på din fod") }}
  </p>
  {{form.age_group.label( gettext("Aldersgruppe") ) }}
  <ul class="radio">
    {{form.age_group(class="radio") }}
    {% for error in form.errors.age_group %}
    <span class="form_error">[{{error}}]</span>
    {% endfor %}
  </ul>

  <br />

  {{form.product_sex.label( gettext("Køn") ) }}
  {{form.product_sex(class="radio") }}
  {% for error in form.errors.product_sex %}
  <span class="form_error">[{{error}}]</span>
  {% endfor %}

  <br />

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.