Hello Mark, thanks for responding to my question I'm using the built-in django commenting system - django.contrib.messages
It was fine with the sqlite db I had done a syncdb and the app was working, but it just seems that now when I add a comment to something there is this issue. Do I need to manually add the autofield to my comment subclass? Thanks! Adam El 09-04-2014, a las 19:46, Mark Furbee <markfur...@gmail.com> escribió: You say you imported the database. Did you use syncdb to set up the tables? It sounds like your comment_id field in MySQL is not set as an auto-incrementing primary key field. Do you have access to that MySQL database to check, and or update that field definition? On Wed, Apr 9, 2014 at 2:42 PM, Adam Teale <adamte...@gmail.com> wrote: > Hi Guys > > I have been working on a django app that was going well using an sqlite db. > I've moved it over to mysql and imported the database > > Everything looks good > > But when I try to use the django comment system that was working well on > the sqlite db before I get: > > OperationalError at /comments/post/ > (1364, "Field 'id' doesn't have a default value") > Request Method: POST > Request URL: http://192.168.1.143/comments/post/ > Django Version: 1.6.2 > Exception Type: OperationalError > Exception Value: > (1364, "Field 'id' doesn't have a default value") > Exception Location: > /Users/admin/Dropbox/mstudio/code/mBrain/mbrain/venv/lib/python2.7/site-packages/MySQLdb/connections.py > in defaulterrorhandler, line 36 > Python Executable: > > > I'm a little lost - do i need to set a default value for > the django.contrib.comments model? > And how would i do that if I needed to - this has an Object ID field - i > don't know how I'd set that up > > > Any ideas? What am i missing? > > Many thanks! > > Adam > > -- > 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/18894c72-24c9-41cd-85a1-4dc09072dfb8%40googlegroups.com<https://groups.google.com/d/msgid/django-users/18894c72-24c9-41cd-85a1-4dc09072dfb8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to a topic in the Google Groups "Django users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/mBcX6IRYwko/unsubscribe. To unsubscribe from this group and all its topics, 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/CACMDPqHbdXorWvLLc%2BDy3eEdvd9Q7gaK6-aCqzuG_X9HvSjz%3DQ%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CACMDPqHbdXorWvLLc%2BDy3eEdvd9Q7gaK6-aCqzuG_X9HvSjz%3DQ%40mail.gmail.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- 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/CAMse0ZhPFFoLwm6naWf-Z%3DiQMEJik3YpDo87BHeC3fVumk2CLw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.