
from flask.ext.wtf import Form
from wtforms import TextField, SelectField, IntegerField, BooleanField,\
    PasswordField, TextAreaField, SubmitField, HiddenField, RadioField
from wtforms import validators


class VerbSet(Form):
    name = TextField('Verb:', validators=[validators.required()])
    active = BooleanField('Active:')
    submit = SubmitField('Submit')


class DCSet(Form):
    name = TextField('Name:', validators=[validators.required()])
    abbreviation = TextField(
        'Abbreviation:',
        validators=[validators.required()]
    )
    submit = SubmitField('Submit')


from flask.ext.wtf import Form
from wtforms import fields, validators


class VerbSet(Form):
    name = fields.TextField('Verb:', validators=[validators.required()])
    active = fields.BooleanField('Active:')
    submit = fields.SubmitField('Submit')


class DCSet(Form):
    name = fields.TextField('Name:', validators=[validators.required()])
    abbreviation = fields.TextField(
        'Abbreviation:',
        validators=[validators.required()]
    )
    submit = fields.SubmitField('Submit')

Rework imports so not having to specify every type of field. Alter field definitions to reflect change
Rework imports so not having to specify every type of field. Alter field definitions to reflect change

  
  from flask.ext.wtf import Form
- from wtforms import TextField, SelectField, IntegerField, BooleanField,\
-     PasswordField, TextAreaField, SubmitField, HiddenField, RadioField
- from wtforms import validators
+ from wtforms import fields, validators
  
  
  class VerbSet(Form):
-     name = TextField('Verb:', validators=[validators.required()])
+     name = fields.TextField('Verb:', validators=[validators.required()])
-     active = BooleanField('Active:')
+     active = fields.BooleanField('Active:')
-     submit = SubmitField('Submit')
+     submit = fields.SubmitField('Submit')
  
  
  class DCSet(Form):
-     name = TextField('Name:', validators=[validators.required()])
+     name = fields.TextField('Name:', validators=[validators.required()])
-     abbreviation = TextField(
+     abbreviation = fields.TextField(
          'Abbreviation:',
          validators=[validators.required()]
      )
-     submit = SubmitField('Submit')
+     submit = fields.SubmitField('Submit')
  
Rework imports so not having to specify every type of field. Alter field definitions to reflect change
## Code Before:

from flask.ext.wtf import Form
from wtforms import TextField, SelectField, IntegerField, BooleanField,\
    PasswordField, TextAreaField, SubmitField, HiddenField, RadioField
from wtforms import validators


class VerbSet(Form):
    name = TextField('Verb:', validators=[validators.required()])
    active = BooleanField('Active:')
    submit = SubmitField('Submit')


class DCSet(Form):
    name = TextField('Name:', validators=[validators.required()])
    abbreviation = TextField(
        'Abbreviation:',
        validators=[validators.required()]
    )
    submit = SubmitField('Submit')

## Instruction:
Rework imports so not having to specify every type of field. Alter field definitions to reflect change
## Code After:

from flask.ext.wtf import Form
from wtforms import fields, validators


class VerbSet(Form):
    name = fields.TextField('Verb:', validators=[validators.required()])
    active = fields.BooleanField('Active:')
    submit = fields.SubmitField('Submit')


class DCSet(Form):
    name = fields.TextField('Name:', validators=[validators.required()])
    abbreviation = fields.TextField(
        'Abbreviation:',
        validators=[validators.required()]
    )
    submit = fields.SubmitField('Submit')
