#11380: missed error description and line (and file) which contains it [TIP]
------------------------------------+---------------------------------------
          Reporter:  pedromagnus    |         Owner:  nobody                  
            Status:  new            |     Milestone:                          
         Component:  Uncategorized  |       Version:  1.0                     
        Resolution:                 |      Keywords:  error, _meta, foreignkey
             Stage:  Unreviewed     |     Has_patch:  0                       
        Needs_docs:  0              |   Needs_tests:  0                       
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by pedromagnus):

  * keywords:  error _meta => error, _meta, foreignkey
  * needs_better_patch:  => 0
  * summary:  missed error description and line (and file) which contains
              it => missed error description and line (and
              file) which contains it [TIP]
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I finally found the origin of the error (with some help of a camarade).
 The error was a ForeignKey declaration:

 {{{
 '''from myapp.practicas import Practica'''
 ...

 # line with the error
 practica = models.ForeignKey(u'Práctica', Practica)

 # corrected line
 practica = models.ForeignKey(Practica, u'Práctica')
 }}}

 The docs say (and really clear) that a ForeignKey declaration MUST start
 with the class name (not with its alias). My mistake is had read the docs
 days after I wrote my app, so I forgot what I had written :P

 The thing here is: the error is missed for the validation, and appears
 when it's too late to reach the error cause (I think). It has to point out
 this kind of errors, it's very tedious to dive in your code looking for
 'something bad'.

 I hope this could be helpfull to someone who's about to dive in the same
 way I did.

 Greetings.
 Pedro

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