j2labs/dictshield — Issue #53: Coerce IntField
Author: desfrenes
Created: 2011-12-12 09:12:17+00:00
State: open

Hello,

This may not be a bug but a feature but I found IntField will not coerce int while UUIDField will:

class Book(Document):
uuid = UUIDField() # assign a string, it will create a UUID
title = StringField(max_length=60)
year = IntField() # assign a string... won't cast to int

Maybe I miss something... if so, how do I enforce an int ?