Hi Chris

I hope this helps:

http://code.djangoproject.com/ticket/373

So there is a "patch" but I didn't try it.
The way I worked around it was by adapting my db model.
Assuming you have an existing db you might want to try the patch.

Nausikaa



On Sep 22, 10:17 am, Chris Withers <ch...@simplistix.co.uk> wrote:
> Hi All,
>
> Is it really the case that the Django ORM doesn't support composite
> primary keys?
>
> I'm looking to do the equivalent of the following sqlalchemy model:
>
> Base = declarative_base(...)
>
> class Month(Base):
>      __tablename__ = 'months'
>      username = Column(
>                  String,ForeignKey('users.name'),primary_key=True
>                  )
>      monthname = Column(String,primary_key=True,index=True)
>      signins = Column(Integer,index=True)
>      signouts = Column(Integer,index=True)
>      total_pages = Column(Integer,index=True)
>      last_viewed = Column(DateTime,index=True)
>
> cheers,
>
> Chris
>
> --
> Simplistix - Content Management, Batch Processing & Python Consulting
>             -http://www.simplistix.co.uk
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to