#11448: Defining relationships after querying a model does not add a reverse 
lookup
to the referenced model
---------------------------------------------------+------------------------
          Reporter:  Dennis Kaarsemaker            |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  1     
        Needs_docs:  0                             |   Needs_tests:  1     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by Alex):

  * needs_tests:  0 => 1
  * stage:  Unreviewed => Accepted

Comment:

 Couple things:
 1. del is a statement, so no need for the parentheses
 2. I think the patch reads a little better as a hasattr() test instead of
 catching the exception.  Also put a comment next to each of these saying
 if the cache is populated we clear it out because it needs to be
 repopulated to include the attr we're about to assign.
 3. Can you put a testcase in the Django tests that demonstrates that this
 has been fixed.

 Otherwise the patch looks good to me.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11448#comment:3>
Django <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