Re: Readonly on subset of forms in Admin inlines

2011-01-23 Thread Peter Phillips
27;, 'issue', 'priority', 'l1', 'c1', 'notes',) + self.readonly_fields return self.readonly_fields Thanks again! On Jan 20, 8:24 pm, Thomas wrote: > Am 20.01.2011 um 03:27 schrieb Peter Phillips: > > > Hello, > > > Is

Readonly on subset of forms in Admin inlines

2011-01-19 Thread Peter Phillips
Hello, Is there a straightforward way to set fields to read only for a subset of the forms in an inline formset in the Admin? I'd like to set some fields to read only on my inline form for rows that were not created by the user. However, when I set the fields to read only, it of course affects all

Noob: Can you use the ORM to do a self join with an aggregate?

2010-02-25 Thread Peter Phillips
Just started in the last few days with django and am having a little trouble with the orm. Is it possible to do a self join with an aggregate? My query looks like the following (apologies for the generic names): SELECT t.field1, c.field2, c.field3, t.field4, t.field5, (t.field4/ t.field5) as "fie