On Mon, Jun 13, 2011 at 9:44 AM, Micky Hulse wrote:
> Ooh, great tip! That looks very useful and possibly a little more
> simple/straight-forward than using a form field.
Too easy!
https://gist.github.com/1023327
Thanks for the help Martin and Alex, I really appreciate it! :)
Have an awesome d
Hi Alex! Thanks for the reply, I really appreciate it. :)
On Sun, Jun 12, 2011 at 9:01 PM, Alex Kamedov wrote:
> It'll be better to use validators with IntegerField
> In this case you can specify allowed year range.
Ooh, great tip! That looks very useful and possibly a little more
simple/straigh
It'll be better to use validators with IntegerField
https://docs.djangoproject.com/en/1.3/ref/models/fields/#validators
https://docs.djangoproject.com/en/1.3/ref/validators/
In this case you can specify allowed year range.
On Sat, Jun 11, 2011 at 9:25 AM, mhulse wrote:
> Hi Martin! Thanks so m
Hi Martin! Thanks so much for the help, I really appreciate it. :)
> The snippet is a form field, not a model field.
Well, that would explain things! Lol.
When I read this in the instructions:
"Usage eg: yob = BirthYearField(label="What year were you born?")"
I thought that was a model field.
I think this is not how it works. The snippet is a form field, not a model
field. Basically I think you should use an IntegerField (you just want to
store a year, right?). Then somehow you need to override the widget or so
and make sure that in the admin that form will be used for that
IntegerField
5 matches
Mail list logo