#565: Unique fields don''t work on edit_inline models
----------------------------------------------+-----------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: Admin
interface
Version: SVN | Resolution:
Keywords: admin edit inline unique error | Stage: Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
----------------------------------------------+-----------------------------
Changes (by Simon G. <[EMAIL PROTECTED]>):
* version: magic-removal => SVN
* stage: Unreviewed => Accepted
Comment:
I've replicated this with the current SVN and this model:
{{{
from django.db import models
# Create your models here.
class Poll(models.Model):
question = models.CharField(maxlength=200)
pub_date = models.DateTimeField('date published')
class Admin:
pass
class Choice(models.Model):
poll = models.ForeignKey(Poll, edit_inline=models.STACKED,
num_in_admin=3)
choice = models.CharField(maxlength=200, core=True, unique=True)
votes = models.IntegerField(core=True)
class Admin:
pass
}}}
However, it raises an IntegrityError (column choice is not unique) and not
just a warning.
--
Ticket URL: <http://code.djangoproject.com/ticket/565#comment:5>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---