I tried this:
import MySQLdb
db = MySQLdb.connect(...)
c = db.cursor()
c.execute("create table mtest (pk int not null auto_increment primary
key, s varchar(5)) type=InnoDB")
print c.execute("insert into mtest values (null,'12345')")
print c.messages
print c.lastrowid
print c.execute("insert
On 19 Lip, 18:32, Alex Gaynor wrote:
> 2009/7/19 Tomasz Zieliński :
>
>
>
>
>
> > On 19 Lip, 16:29, Joshua Russo wrote:
> >> 2009/7/19 Tomasz Zieliński
>
> >> > So, should
2009/7/19 Tomasz Zieliński :
>
>
>
> On 19 Lip, 16:29, Joshua Russo wrote:
>> 2009/7/19 Tomasz Zieliński
>>
>> > So, should m.save() set m.id to some other value than None
>> > or this is relaxed when
On 19 Lip, 16:29, Joshua Russo wrote:
> 2009/7/19 Tomasz Zieliński
>
> > So, should m.save() set m.id to some other value than None
> > or this is relaxed when Warning exception is thrown?
>
> It's the database that gives m.id a value
2009/7/19 Tomasz Zieliński
> So, should m.save() set m.id to some other value than None
> or this is relaxed when Warning exception is thrown?
It's the database that gives m.id a value upon a valid save. So because the
record couldn't be saved it never
On 19 Lip, 10:35, Daniel Roseman wrote:
>
> I don't know why you think it's a bug. Django's models are - by design
> - not an instantaneous reflection of the database. Rather, they only
> interact with the DB when you load and save them. So this is the
> expected
On Jul 18, 10:39 pm, Tomasz Zieliński
wrote:
> I prepared following repro case, just paste to models.py to an empty
> project:
>
> ---
> from MySQLdb import Warning as Warning
> from django.db import models
I prepared following repro case, just paste to models.py to an empty
project:
---
from MySQLdb import Warning as Warning
from django.db import models
import unittest
class TestModel(models.Model):
char_field =
8 matches
Mail list logo