#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)
Change History (4)
by , 16 years ago
comment:1 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You need the blank=True
argument as well: http://docs.djangoproject.com/en/dev/ref/models/fields/#blank
Note:
See TracTickets
for help on using tickets.
Image of admin page