#14678: Users are able to add more than one page to the same url
-------------------------------------+-------------------------------------
               Reporter:  seler      |          Owner:  j4nu5
                   Type:  Bug        |         Status:  assigned
              Milestone:             |      Component:  contrib.flatpages
                Version:  SVN        |       Severity:  Normal
             Resolution:             |       Keywords:  flatpages, unique,
           Triage Stage:  Accepted   |  sites
    Needs documentation:  0          |      Has patch:  1
Patch needs improvement:  0          |    Needs tests:  0
                  UI/UX:  0          |  Easy pickings:  0
-------------------------------------+-------------------------------------

Comment (by Alex):

 a) This is a good use case for exists()

 b) I'm pretty sure you can reduce this to a single SQL query for the case
 of "no duplicates" and only do O(n) to get the conflicting site if you
 need to generate an error message.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/14678#comment:26>
Django <https://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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to