Re: My Data dont be updated with my forms
Well, as i feared... it was an oversight of me.
I override Save method to slugify the Title of the Event but Super instructions it was inside If statement.
THIS WAS THE BUG CODE
def save(self, *args, **kwargs):
if not self.id:
self.Url = slughifi(self.Titulo)
super(Eventos, self).save(*args, **kwargs)
THIS IS CORRECT
def save(self, *args, **kwargs):
if not self.id:
self.Url = slughifi(self.Titulo)
super(Eventos, self).save(*args, **kwargs)
Thats my whoooole problem
Thanks a lot !!
2013/3/17 Rafael E. Ferrero <rafael.ferrero@gmail.com>
Thanks Dan i'll try your advice !!
El 16/03/2013 22:22, "Dan Gentry" <dan@gentryville.net> escribió:Rafael,
This is a bit of a wild guess, but I'm wondering if your form isn't validating. Since your template doesn't seem to be displaying any errors, you wouldn't know it.
Also, since the Url column is marked as unique, but you are excluding it from the form, it may be the field throwing the error.
Just to check, add {{form.errors}} to your template and give it a try.
Best of luck,
Dan
--
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+unsubscribe@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
Rafael E. Ferrero
Claro: (03562) 15514856 --
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+unsubscribe@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home