Re: get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-02 Thread Tom Evans
No, django does not support composite primary keys. So trying to use composite primary keys will not work. The best you can accomplish is a constraint. HTH Tom On Thu, Dec 2, 2010 at 7:45 AM, Pranav wrote: > > > On Dec 2, 12:10 am, bruno desthuilliers > wrote: >> On 1 déc, 19:20, Pranav wrote

Re: get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-01 Thread Pranav
On Dec 2, 12:10 am, bruno desthuilliers wrote: > On 1 déc, 19:20, Pranav wrote: > > > Hi all, > > > I'm new to django and python and i'm working on a project that works > > with a legacy database. > > I've a particular problem with a "composite key" and "get" or > > "get_object_or_404". > > > i

Re: get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-01 Thread bruno desthuilliers
On 1 déc, 19:20, Pranav wrote: > Hi all, > > I'm new to django and python and i'm working on a project that works > with a legacy database. > I've a particular problem with a "composite key" and "get" or > "get_object_or_404". > > i generated the below model form the legacy database using inspec

Re: get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-01 Thread Daniel Roseman
On Dec 1, 6:20 pm, Pranav wrote: > Hi all, > > I'm new to django and python and i'm working on a project that works > with a legacy database. > I've a particular problem with a "composite key" and "get" or > "get_object_or_404". > > i generated the below model form the legacy database using inspec

get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-01 Thread Pranav
Hi all, I'm new to django and python and i'm working on a project that works with a legacy database. I've a particular problem with a "composite key" and "get" or "get_object_or_404". i generated the below model form the legacy database using inspectdb model: -- class Member: