Hi,
On 24 Aug., 14:10, Karen Tracey wrote:
> If you want automatic assignment, you need to make
> it an AutoField with primary_key=True.
thanks a lot, that fixed it!
Regards,
Daniel
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
On Tue, Aug 24, 2010 at 5:55 AM, Dan wrote:
> I have some troubles with my Django model: whenever I create a new
> object the ID (primary key) is not being assigned to it after calling
> obj.save().
>
> I am on RHEL with Python 2.4.3 and Django 1.2.1 (with MySQL backend).
>
> I've uploaded a code
Django assigns an id field to models automatically, so you dont need
to define it seperately. And even if you define it you have to assign
auto_increment = true so that it is automatically filled.
On Aug 24, 2:55 pm, Dan wrote:
> Hi,
>
> I have some troubles with my Django model: whenever I creat
Hi,
I have some troubles with my Django model: whenever I create a new
object the ID (primary key) is not being assigned to it after calling
obj.save().
I am on RHEL with Python 2.4.3 and Django 1.2.1 (with MySQL backend).
I've uploaded a code snippet which clearly shows the problem:
http://past
4 matches
Mail list logo