Re: TransactionMiddleware not working
Thanks for the help. Transactions work just fine after changing MyISam to InnoDB. -- Thanks & Regards Parag Shah On Tue, Jul 21, 2009 at 7:42 PM, Randy Barlowwrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Parag Shah declared: > > I am using MySql. I believe it does support transactions. > > MySQL only supports transactions if you are using INNODB tables. This > is not the default. > > - -- > Randy Barlow > Software Developer > The American Research Institute > http://americanri.com > 919.228.4971 > -BEGIN PGP SIGNATURE- > Version: GnuPG v2.0.11 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkplzMAACgkQw3vjPfF7QfWmzwCfY/kP3fEltHzOEfBQc/BZ+HrN > ufAAnjgRqhFwDbPym+4fo1NxiR1mrBgu > =mSLk > -END PGP SIGNATURE- > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: TransactionMiddleware not working
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Parag Shah declared: > I am using MySql. I believe it does support transactions. MySQL only supports transactions if you are using INNODB tables. This is not the default. - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkplzMAACgkQw3vjPfF7QfWmzwCfY/kP3fEltHzOEfBQc/BZ+HrN ufAAnjgRqhFwDbPym+4fo1NxiR1mrBgu =mSLk -END PGP SIGNATURE- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: TransactionMiddleware not working
Not all of the storage engines in MySQL support transactions, e.g., MyISAM doesn't. On Tue, Jul 21, 2009 at 9:54 AM, Parag Shahwrote: > Hi Andrew, > > I am using MySql. I believe it does support transactions. Here is the > version line of my instance of MySql > > $mysql -V > mysql Ver 14.12 Distrib 5.0.67, for debian-linux-gnu (x86_64) using > readline 5.2 > > -- > Thanks & Regards > Parag Shah > > On Tue, Jul 21, 2009 at 7:16 PM, Andrew Fong wrote: >> >> Just double checking, but are you using a DB that supports >> transactions? >> > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: TransactionMiddleware not working
Hi Andrew, I am using MySql. I believe it does support transactions. Here is the version line of my instance of MySql $mysql -V mysql Ver 14.12 Distrib 5.0.67, for debian-linux-gnu (x86_64) using readline 5.2 -- Thanks & Regards Parag Shah On Tue, Jul 21, 2009 at 7:16 PM, Andrew Fongwrote: > > Just double checking, but are you using a DB that supports > transactions? > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: TransactionMiddleware not working
Just double checking, but are you using a DB that supports transactions? On Jul 21, 8:16 am, Parag Shahwrote: > Hello, > > Hello, > > I am using TransactionMiddleware to get per request transactions working in > my Django project. However, it does not seem to be working. > > I have a view in which I save an object and when I try to save a related > object there is an Exception. However, the first object is still saved. > Please find my code at:http://pastebin.com/f5b498b16 > > The topic_add(...) method is a view method which results in adding 3 rows > when a topic is added to a course: > 1. Add the topic to the courses_topic table > 2. Add a row to the courses_topic_courses table (because there is a > many-to-many relationship between Topic and Course) > 3. Add a row to the courses_topicorder table > > I deliberately introduced an error before step 3, yet step 1 and 2 were > carried out successfully. > > Any help is appreciated. > > -- > Thanks & Regards > Parag Shah --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
TransactionMiddleware not working
Hello, Hello, I am using TransactionMiddleware to get per request transactions working in my Django project. However, it does not seem to be working. I have a view in which I save an object and when I try to save a related object there is an Exception. However, the first object is still saved. Please find my code at: http://pastebin.com/f5b498b16 The topic_add(...) method is a view method which results in adding 3 rows when a topic is added to a course: 1. Add the topic to the courses_topic table 2. Add a row to the courses_topic_courses table (because there is a many-to-many relationship between Topic and Course) 3. Add a row to the courses_topicorder table I deliberately introduced an error before step 3, yet step 1 and 2 were carried out successfully. Any help is appreciated. -- Thanks & Regards Parag Shah --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---