Ivan, Did this code paste correctly? There is a syntax error in the save method:
def save (self, force_insert = False, force_update = False): self.nome self.nome.upper = () <--- SYNTAX ERROR super (Carrier, self). save (force_insert, force_update) Is that supposed to be: self.name = self.name.upper() ? On Monday, September 30, 2013 9:52:09 AM UTC-5, Ivan Goncalves wrote: > > Hi.... > > I'm having trouble with the South. > > In the model below: > > class Carrier (models.Model): > name = models.CharField (max_length = 40, blank = False, null = > False, verbose_name = 'Name') > user = models.ForeignKey (User, blank = True, null = True) > > def save (self, force_insert = False, force_update = False): > self.nome self.nome.upper = () > super (Carrier, self). save (force_insert, force_update) > > def __ unicode__ (self): > return u '% s'% (self.nome) > > the error occurs when i run the migrate after South on the app. > SyntaxError: invalid syntax (<string>, line 1) > > But if my model does not have the user field, then the error message does > not occur, as shown below: > > class Carrier (models.Model): > name = models.CharField (max_length = 40, blank = False, null = > False, verbose_name = 'Name') > > def save (self, force_insert = False, force_update = False): > self.nome self.nome.upper = () > super (Carrier, self). save (force_insert, force_update) > > def __ unicode__ (self): > return u '% s'% (self.nome) > > > I need the field User. What I have to do ? > > Thanks a lot. > > Ivan > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/251f724e-55fe-47b6-8436-8ab6aa966b0e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.