__yaml__ is not mandatory #4

Open
xen opened this Issue Sep 9, 2012 · 0 comments

Projects

None yet

1 participant

@xen
Owner
xen commented Sep 9, 2012
(flask) >>> from formgear import models
(flask) >>> class Page(models.Model):
...     pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/xen/.virtualenvs/flask/lib/python2.7/site-packages/formgear/models.py", line 115, in __new__
    raise YamlEntryNotFoundInListException
formgear.exceptions.YamlEntryNotFoundInListException
(flask) >>> from formgear import fields
(flask) >>> class Page(models.Model):
...     title = fields.StringField(title="News Title", length=80, required=True)
...     body = field.TextField()
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in Page
NameError: name 'field' is not defined
(flask) >>> class Page(models.Model):
...     title = fields.StringField(title="Page Title", length=80, required=True)
...     body = fields.TextField()
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/xen/.virtualenvs/flask/lib/python2.7/site-packages/formgear/models.py", line 115, in __new__
    raise YamlEntryNotFoundInListException
formgear.exceptions.YamlEntryNotFoundInListException
(flask) >>> 

So, yaml isn't should be mandatory and should be optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment