Opened 16 years ago

Closed 16 years ago

Last modified 13 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

Description

Hi,

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 16 years ago.
Image of admin page

Download all attachments as: .zip

Change History (4)

by anonymous, 16 years ago

Attachment: err.PNG added

Image of admin page

comment:1 by Jacob, 16 years ago

Resolution: invalid
Status: newclosed

You need the blank=True argument as well: http://docs.djangoproject.com/en/dev/ref/models/fields/#blank

comment:2 by koranthala, 16 years ago

Sorry

comment:3 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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