On 1/20/06, hugo <[EMAIL PROTECTED]> wrote:
> BTW: the bulk delete stuff can be made more complete database-wise by
> using the delete sql clause to construct deletes against related tables
> (and doing updates against related tables).
I have no difficulty in seeing how it _can_ be done. However
On 1/20/06, Smudgy <[EMAIL PROTECTED]> wrote:
> And how to write something like this expression:
> bazs.get_list(order_by=['bardata']) - sort by field of another table.
Hi Smudgy,
To order by a field in a different table, add the other table's name
and a dot, like so:
bazs.get_list(order_
> You are talking about the admin interface - we are talking about the database
> API. The database API doesn't check any permissions, as it's a Python call
> done by the programmer, and we still trust the programmer
;-)
Yep, I realize that, and wasn't trying to ignore the db changes to
support
As I read, 'order_in_respect` Is just adds '_order` field. Something
like immutable order for local table. :(
Hi folks. Please tell me how can I do such thing...
I have
class Bar(meta.Model):
bardata = meta.CharField(maxlength=200)
class Baz(meta.Model):
bazdata = meta.CharField(maxlength=200)
bar = meta.OneToOneField(Bar)
bazs.get_list(order_by=['bazdata']) will return me ordered by bazda
Perhaps use "order_with_respect_to"? I've never used myself but from
the docs looks like it is what you're looking for.
http://www.djangoproject.com/documentation/model_api/#meta-options
On 1/20/06, Smudgy <[EMAIL PROTECTED]> wrote:
>
> Hi folks. Please tell me how can I do such thing...
>
> I
>Doesn't the delete function also checks permissions on all the
>referenced rows? I don't think you can implement this in SQL.
You are talking about the admin interface - we are talking about the
database API. The database API doesn't check any permissions, as it's a
Python call done by the progr