#2425: 'manage.py sql polls' fail with no error if invalid model
------------------------------+---------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  adrian
     Type:  defect            |       Status:  new   
 Priority:  low               |    Milestone:        
Component:  Tools             |      Version:  SVN   
 Severity:  normal            |   Resolution:        
 Keywords:                    |  
------------------------------+---------------------------------------------
Changes (by Simon Greenhill):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 This can sort of be fixed by adding a call to validate() inside the
 execute_from_command_line() function in django/core/management.py. This
 will validate the installed models when sql/sqlall are run, and show up
 the errors quite nicely, before exiting with an AttributeError.
 
 It'd be nicer to handle the AttributeError's better and to not display "0
 errors found" when the models are fine, but I think this will involve
 modifying validate, get_validation_errors, or
 _check_for_validation_errors, and I didn't want to go near that.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2425>
Django <http://code.djangoproject.org/>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to