#3083: MySQL IntegrityError Exception on object creation
-------------------------+--------------------------------------------------
   Reporter:  anonymous  |                Owner:  adrian                
     Status:  new        |            Component:  Admin interface       
    Version:             |           Resolution:                        
   Keywords:             |                Stage:  Design decision needed
  Has_patch:  0          |           Needs_docs:  0                     
Needs_tests:  0          |   Needs_better_patch:  0                     
-------------------------+--------------------------------------------------
Changes (by [EMAIL PROTECTED]):

  * component:  Database wrapper => Admin interface
  * stage:  Unreviewed => Design decision needed

Comment:

 I propose to do it like this, so there's no need to interprete database
 error messages:
 
 {{{
 for i in range(settings.RETRIES)
    ... validate ...
    try:
      ... save ...
      break
    except ...
      ... roll back ...
 }}}
 
 But perhaps someone has a better idea. If there's a good pattern, maybe
 the generic views could use it, too?
 
 Since there's a multitude of ways to solve this and it is not clear how to
 proceed (Adrian has rejected the above solution), I only put this into
 "Design decision needed".
 
 Some references from django-users:
 
  * [http://groups.google.de/group/django-
 
users/browse_thread/thread/64a9558d5c02e39/33b8f9b46ff76f05?lnk=gst&q=IntegrityError&rnum=1#33b8f9b46ff76f05
 Adrian's rejection of the above solution]
 
  * [http://groups.google.de/group/django-
 users/browse_thread/thread/0357be5fcc49e4bc/ More recent thread about this
 problem]

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3083#comment:2>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to