On Aug 20, 3:39 am, James Chiang <jchian...@gmail.com> wrote:
> Hi,
>
> I'm new to django too, but I was able to define models for a legacy
> database and specifying the primary keys using "primary_key=True".
> Our tables have composite PKs, so I just added that option for all the
> columns that were appropriate.  I don't know whether django does
> anything with the composite keys, but everything seems to work just
> fine and I can run databrowse to look at my tables.  

Hmm, AFAIK Django does not support composite primary keys.
http://docs.djangoproject.com/en/dev/faq/models/#do-django-models-support-multiple-column-primary-keys

I don't know how you got that to work. :) I just tried it and although
databrowse comes up, I get MultipleObjectsReturned exceptions when I
try to look at anything (not too surprisingly).

If you just want
> to browse your tables, something like dbvis seems like a better
> option.

I'm looking for something open source that will let me extend it/my
data (like add derived data) in the future.

thanks
Brianna

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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