On Mon, 2008-03-24 at 07:02 -0700, Valery wrote:
> Hi all,
> 
> i got django 0.95.1 (the one currently available under Ubuntu Feisty).
> I fail to convince Django to accept my aggregated "GROUP BY" database
> views as they have no primary key and, surely, Django also can't
> create this pk for me in a view :)

Could you explain what you are trying to do here, please. Perhaps with a
(short!) example

Okay, Django likes every table to have a primary key so that it can
identify separate instances of rows of data. So you need one column in
your table or database view that can act as the key in this sense.
Beyond that, Django shouldn't really care whether it's talking to a
table or a view, providing you don't try to save to the view, I guess.
It just wants to be able to select columns from something that can go in
a "FROM" clause in a query -- be that a table or a view. Anything with a
name will do.

The posts you reference are to do with aggregation support in queries
(which are work in progress and support at the Django ORM layer don't
exist for htem yet), not views in the database. So I think some wires
are getting crossed somewhere there

Regards,
Malcolm

-- 
Success always occurs in private and failure in full view. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to