Django

Code

Ticket #8209 (closed: fixed)

Opened 4 months ago

Last modified 3 months ago

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

Reported by: glenjamin Assigned to: Alex
Milestone: 1.0 Component: Forms
Version: SVN Keywords: 1.0-blocker
Cc: tomek+django@hauru.eu Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by jacob)

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

Attachments

8209_model_forms_unique.diff (3.7 kB) - added by dgouldin on 08/15/08 16:49:25.
django-r8769-8209.diff (5.4 kB) - added by Alex on 08/31/08 15:22:41.
django-r8769-8209.2.diff (5.7 kB) - added by Alex on 08/31/08 15:27:59.
Fixed merge errors with latest trunk
8209_modelform_unique_validation.1.diff (11.5 kB) - added by brosner on 09/01/08 02:04:19.
added a patch for review
django-8209.diff (11.6 kB) - added by Alex on 09/01/08 10:44:57.
Tiny change from brosner's patch
django-8209.2.diff (12.1 kB) - added by Alex on 09/01/08 12:41:05.
New patch
django-8209.3.diff (11.9 kB) - added by Alex on 09/01/08 12:45:07.
Removed usage of any

Change History

08/12/08 13:14:30 changed by jacob

  • description changed.
  • needs_better_patch changed.
  • component changed from Documentation to Forms.
  • needs_tests changed.
  • summary changed from Admin documentation claims that uniqueness is enforced in the interface to ModelForms (and hence the admin) don't check unique constraints.
  • milestone set to 1.0.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.

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

08/13/08 16:02:43 changed by oinopion

  • cc set to tomek+django@hauru.eu.

08/15/08 12:58:25 changed by cmarshal

  • owner changed from nobody to cmarshal.
  • status changed from new to assigned.

08/15/08 13:47:20 changed by dgouldin

  • owner changed from cmarshal to dgouldin.
  • status changed from assigned to new.

08/15/08 16:49:25 changed by dgouldin

  • attachment 8209_model_forms_unique.diff added.

08/16/08 16:40:43 changed by gwilson

  • owner changed from dgouldin to gwilson.
  • status changed from new to assigned.

08/31/08 15:19:19 changed by Alex

  • owner changed from gwilson to Alex.
  • status changed from assigned to new.

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

08/31/08 15:22:41 changed by Alex

  • attachment django-r8769-8209.diff added.

08/31/08 15:27:59 changed by Alex

  • attachment django-r8769-8209.2.diff added.

Fixed merge errors with latest trunk

08/31/08 16:01:37 changed by jacob

  • keywords set to 1.0-blocker.

09/01/08 02:04:19 changed by brosner

  • attachment 8209_modelform_unique_validation.1.diff added.

added a patch for review

09/01/08 02:04:57 changed by brosner

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

09/01/08 02:29:55 changed by akaihola

  • has_patch set to 1.

09/01/08 10:44:57 changed by Alex

  • attachment django-8209.diff added.

Tiny change from brosner's patch

09/01/08 12:21:51 changed by Alex

Ignore my patch in favor of brosners.

09/01/08 12:41:05 changed by Alex

  • attachment django-8209.2.diff added.

New patch

09/01/08 12:45:07 changed by Alex

  • attachment django-8209.3.diff added.

Removed usage of any

09/01/08 14:08:08 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #8209 (ModelForms (and hence the admin) don't check unique constraints)




Change Properties
Action