Bonsoir, Un pile d'exécution serait plus parlante. Il faut croire que quelquepart dans le models.py il y a un model au lieu de models. En outre, le champs town fait appel à un charfield au lieu d'un CharField
Cordialement, Xavier Ordoquy. Le 27 sept. 2012 à 18:07, carlos <[email protected]> a écrit : > Bonjour, > j'ai crée un model mais quand je lance la commande python manage.py > syncdb j'ai cette erreur: > > Name error :name 'model' is not defined. > voici mon code: > > [code] > > class Enseignent(models.Model): > name = models.CharField(max_length=42) > firstname = models.CharField(max_length=42) > speciality= models.charfied(max_length=30) > sex = models.CharField(max_length=42) > login = models.CharField(max_length=100) > password = models.CharField(max_length=42) > country = models.CharField(max_length=42) > town = models.charfied(max_length=30) > > def __unicode__(self): > return self.name > > [/code] > > s'il vous plait c'est urgent pour moi. > merci > _______________________________________________ > django mailing list > [email protected] > http://lists.afpy.org/mailman/listinfo/django _______________________________________________ django mailing list [email protected] http://lists.afpy.org/mailman/listinfo/django
