Andre, in addition to saying null=True, try adding blank=True.

  -- Scott

On Fri, May 16, 2008 at 8:06 AM, Andre Meyer <[EMAIL PROTECTED]>
wrote:

> hi all
>
> now, this is driving me crazy. this problem persists even after switching
> from 0.96.1 to the newforms-admin branch.
>
> after declaring a model class with an attribute that may be null (pn) the
> admin site still tells me to fill in that field, because "This field is
> required.", but it isn't.
>
> i have registered the model class to the admin site without any custom
> options.
>
> recreated the database file (sqlite) after switching to the na branch.
>
> checked in SQLite Manager that the pn field may indeed be null.
>
> new Dossier instances can be created and saved in the shell without the pn
> attribute, but when viewing the instance on the admin page and pressing
> Save, the error appears.
>
> what is the matter?????
>
> thanks for your suggestions
> cheers
> André
>
>
> code:
>
> *model.py
> *
> class Dossier(models.Model):
>     an = models.CharField('Dossier number', max_length=10,
> primary_key=True)
>     pn = models.CharField('Publication number', max_length=20, null=True)
>
>     def __unicode__(self):
>         return self.an
>
> admin.site.register(Dossier)
>
>
> >
>


-- 
http://scott.andstuff.org/ | http://truthadorned.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to