Re: Admin debugging delete

2015-12-21 Thread James Schneider
> > Now I think about it, I suspect your way (and now my preferred way) might have been an innovation for Python 3? > > M I don't believe so. I didn't look, but I think that syntax goes back <= 2.6. Pretty sure I've used it in 2.4. I know I've been using it in 2.7 for years. As I mentioned, I'd ne

Re: Admin debugging delete

2015-12-20 Thread Mike Dewhirst
On 21/12/2015 6:03 PM, James Schneider wrote: I haven't tested this, but I think that will end up looking for False (the 'not' applying to 'instance' rather than the 'in' operation) in self.deleted_objects, which means saving would be broken entirely. It cer

Re: Admin debugging delete

2015-12-20 Thread James Schneider
> I haven't tested this, but I think that will end up looking for False >> (the 'not' applying to 'instance' rather than the 'in' operation) in >> self.deleted_objects, which means saving would be broken entirely. >> > > It certainly looks nicer. But it didn't break saving so I assume it means > so

Re: Admin debugging delete

2015-12-20 Thread Mike Dewhirst
On 20/12/2015 4:30 PM, James Schneider wrote: > Â Â for instance in instances: > Â Â Â Â if not instance in self.deleted_objects: > Â Â Â Â Â Â instance.modified_by = request.user > Â Â Â Â Â Â instance.save() > > ... but that didn't do anything. Shouldn't that be: if i

Re: Admin debugging delete

2015-12-19 Thread James Schneider
> for instance in instances: > if not instance in self.deleted_objects: > instance.modified_by = request.user > instance.save() > > ... but that didn't do anything. Shouldn't that be: if instance not in self.deleted_objects: I haven't tested this, but I think

Re: Admin debugging delete

2015-12-19 Thread Mike Dewhirst
On 18/12/2015 9:02 PM, Andreas Kuhne wrote: Hi, Are you working in django admin and using the delete checkbox to delete a child record? Yes If so, it is not a javascript event, but it is handled by when you save to the parents form (it's a formset with child forms). I would follow where the

Re: Admin debugging delete

2015-12-18 Thread Mike Dewhirst
Thanks Andreas - I'll dig deeper! Cheers Mike On 18/12/2015 9:02 PM, Andreas Kuhne wrote: Hi, Are you working in django admin and using the delete checkbox to delete a child record? If so, it is not a javascript event, but it is handled by when you save to the parents form (it's a formset wi

Re: Admin debugging delete

2015-12-18 Thread Andreas Kuhne
Hi, Are you working in django admin and using the delete checkbox to delete a child record? If so, it is not a javascript event, but it is handled by when you save to the parents form (it's a formset with child forms). I would follow where the django code stops executing. Regards, Andréas 2015

Re: Admin debugging delete

2015-12-18 Thread Mike Dewhirst
Forgot to mention - Django 1.8, Python 2.7 and 3.4, Postgres 9.1 and 9.3, Apache 2.2 and the dev server I have been digging a little and think this is a javascript initiated event. I am not comfortable with javascript so my uncertainty has just doubled. Thanks very much for any direction Ch

Admin debugging delete

2015-12-16 Thread Mike Dewhirst
I'm having trouble debugging a failed child record Delete. That is the Delete [x] checkbox being ticked does not delete the child record. It is obviously something to do with my bad but I'm not sure where to start. Any hints? Thanks Mike -- You received this message because you are subscri