Hello, I'm having dificulty with saving data to a MySQL database. I created a simple model:
*class Music(models.Model):* * title = models.CharField(max_length=100)* * slug = models.SlugField(null=True)* * content = models.FileField(upload_to="music", null=True, blank=True)* * def __str__(self):* * return self.title* * def save(self, *args, **kwargs):* * self.slug = slugify(self.title)* * super(Music, self).save(*args, **kwargs)* when I try to create a music: *>>> from myapp.models import Music* *>>> Music.objects.all()* *[]* *>>> m=Music(title="Title of the musicr")* *>>> m.save()* I'm having the following error: *File "C:\Python34\lib\site-packages\mysql\connector\cursor.py", line 860, in statement* * return self._executed.strip()* *AttributeError: 'NoneType' object has no attribute 'strip'* As you may notice I'm using the 'mysql.connector.django' backend to connect django to MySQL. When I used the same model in a SQLite database no error happened. Someone knows how I can solve this problem? -- 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/0089b059-9c2f-4ce5-ba18-103417263058%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.