Opened 5 years ago

Closed 5 years ago

Last modified 3 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: UI/UX:



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

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by anonymous

Image of admin page

comment:1 Changed 5 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

You need the blank=True argument as well:

comment:2 Changed 5 years ago by koranthala


comment:3 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.