#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            |    Keywords:        
------------------------------+---------------------------------------------
 Hi,
 
 I just run throught the first part of the tutorial, until I get stuck for
 a few minutes with the {{{python manage.py sql polls}}} :
 {{{
 $ python manage.py sql polls
 BEGIN;
 COMMIT;
 $
 }}}
 
 The model for this setup is :
 {{{
 from django.db import models
 
 class Poll(models.Model):
     question = models.CharField(maxlength=200)
     pub_date = models.DateiTimeField('date published')
 
 class Choice(models.Model):
     poll = models.ForeignKey(Poll)
     choice = models.CharField(maxlength=200)
     votes = models.IntergerField()
 }}}
 
 Of course, it is wrong, since 'DateiTimeField' and 'IntergerField' are
 mispelled, which is reported by {{{python manage.py validate polls}}} :
 {{{
 $ python manage.py validate polls
 mysite.polls: 'module' object has no attribute 'DateiTimeField'
 1 error found.
 $ python manage.py validate polls
 mysite.polls: 'module' object has no attribute 'IntergerField'
 1 error found.
 $ python manage.py validate polls
 0 errors found.
 $
 }}}
 
 But, I think {{{python manage.py sql}}} should report the error too, or at
 least give a hint.

-- 
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