Opened 16 years ago

Closed 15 years ago

Last modified 12 years ago

#8209 closed (fixed)

ModelForms (and hence the admin) don't check unique constraints

Reported by: glenjamin Owned by: Alex Gaynor
Component: Forms Version: dev
Severity: Keywords: 1.0-blocker
Cc: tomek+django@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Jacob)

They don't - in fact in SQLite a raw exception is propagated all the way up.

Attachments (7)

8209_model_forms_unique.diff (3.7 KB ) - added by David Gouldin 16 years ago.
django-r8769-8209.diff (5.4 KB ) - added by Alex Gaynor 15 years ago.
django-r8769-8209.2.diff (5.7 KB ) - added by Alex Gaynor 15 years ago.
Fixed merge errors with latest trunk
8209_modelform_unique_validation.1.diff (11.5 KB ) - added by Brian Rosner 15 years ago.
added a patch for review
django-8209.diff (11.6 KB ) - added by Alex Gaynor 15 years ago.
Tiny change from brosner's patch
django-8209.2.diff (12.1 KB ) - added by Alex Gaynor 15 years ago.
New patch
django-8209.3.diff (11.9 KB ) - added by Alex Gaynor 15 years ago.
Removed usage of any

Download all attachments as: .zip

Change History (19)

comment:1 by Jacob, 16 years ago

Component: DocumentationForms
Description: modified (diff)
milestone: 1.0
Summary: Admin documentation claims that uniqueness is enforced in the interfaceModelForms (and hence the admin) don't check unique constraints
Triage Stage: UnreviewedAccepted

Actually, I think ModelForms need to learn how to understand the unique stuff. I'm hijaking this ticket for that :)

comment:2 by Tomek Paczkowski, 16 years ago

Cc: tomek+django@… added

comment:3 by cmarshal, 16 years ago

Owner: changed from nobody to cmarshal
Status: newassigned

comment:4 by David Gouldin, 16 years ago

Owner: changed from cmarshal to David Gouldin
Status: assignednew

by David Gouldin, 16 years ago

comment:5 by Gary Wilson, 16 years ago

Owner: changed from David Gouldin to Gary Wilson
Status: newassigned

comment:6 by Alex Gaynor, 15 years ago

Owner: changed from Gary Wilson to Alex Gaynor
Status: assignednew

I've got a patch that I will upload shortly.

by Alex Gaynor, 15 years ago

Attachment: django-r8769-8209.diff added

by Alex Gaynor, 15 years ago

Attachment: django-r8769-8209.2.diff added

Fixed merge errors with latest trunk

comment:7 by Jacob, 15 years ago

Keywords: 1.0-blocker added

by Brian Rosner, 15 years ago

added a patch for review

comment:8 by Brian Rosner, 15 years ago

Added an improved patch to deal with formsets and save_as_new stuff.

comment:9 by Antti Kaihola, 15 years ago

Has patch: set

by Alex Gaynor, 15 years ago

Attachment: django-8209.diff added

Tiny change from brosner's patch

comment:10 by Alex Gaynor, 15 years ago

Ignore my patch in favor of brosners.

by Alex Gaynor, 15 years ago

Attachment: django-8209.2.diff added

New patch

by Alex Gaynor, 15 years ago

Attachment: django-8209.3.diff added

Removed usage of any

comment:11 by Jacob, 15 years ago

Resolution: fixed
Status: newclosed

(In [8805]) Fixed #8209: ModelForms now validate unique constraints. Alex Gaynor did much of this work, and Brian Rosner helped as well.

comment:12 by Jacob, 12 years ago

milestone: 1.0

Milestone 1.0 deleted

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