Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#10373 closed (invalid)

Django Admin: Adding new tuples: Does not allow if fields are null.

Reported by: koranthala Owned by: nobody
Component: contrib.admin Version:
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



I reproduced this in Django 1.1, but I had seen this in earlier versions too.
Using the Django Admin page, I am trying to add new tuples to the system.

In one of my Models, I have a field with null=True. But, when I try to add that tuple with that field as null, it does not allow it to be added.

Rather it gives an error '* This field is required'.

I have attached an image and the Model alongwith.

The model:

class User(models.Model):
    id = models.IntegerField(primary_key=True)
    name = models.CharField(max_length=256)
    library = models.ForeignKey(Template, null=True)

Attachments (1)

err.PNG (6.3 KB) - added by anonymous 14 years ago.
Image of admin page

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by anonymous

Attachment: err.PNG added

Image of admin page

comment:1 Changed 14 years ago by Jacob

Resolution: invalid
Status: newclosed

You need the blank=True argument as well:

comment:2 Changed 14 years ago by koranthala


comment:3 Changed 11 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top