Thanks, Dan and Daniel.
On Tue, Jun 22, 2010 at 3:45 PM, Daniel Roseman wrote:
> On Jun 22, 9:11 pm, Jonathan Hayward
> wrote:
> > What is the preferred way to make e.g. a TextField that will pass
> validation
> > if it is left empty? I've seen two approaches apparently referenced in
> the
> > d
On Jun 22, 9:11 pm, Jonathan Hayward
wrote:
> What is the preferred way to make e.g. a TextField that will pass validation
> if it is left empty? I've seen two approaches apparently referenced in the
> documentation:
>
> additional_comments = models.TextField(required = False)
>
> addition
Jonathan,
I think what you are running into is the differences between how
models are declared vs how forms are declared. In models you declare
the fields as blank=True and/or null=True to specify that the data
stored in the database can be left blank. Something like this:
class MyModel(models.Mo
What is the preferred way to make e.g. a TextField that will pass validation
if it is left empty? I've seen two approaches apparently referenced in the
documentation:
additional_comments = models.TextField(required = False)
additional_comments = models.TextField(blank = True)
and run int
4 matches
Mail list logo