Looking for some insight into a tiny piece of the django codebase

2012-03-19 Thread Tim Diggins
Hi - I'm wondering what the lines at the end of django/db/models/ deletion.py do: for model, instances in self.data.iteritems(): for instance in instances: setattr(instance, model._meta.pk.attname, None) They're at the end of the delete method from Collector c

Re: Raising more than just 404

2010-12-04 Thread Tim Diggins
(and apologies, (just after I hit send) I realized that I may be off mark, as I'm not working with 1.3/dev in my current apps... so I may be missing some critical changes in 1.3.) On Dec 4, 9:15 am, Tim Diggins wrote: > This sounds good to me, but can I give an additional or alt

Re: Raising more than just 404

2010-12-04 Thread Tim Diggins
This sounds good to me, but can I give an additional or alternative exception handling, for consideration (feels a bit simpler, both to use and to implement): Exceptions: When catching an exception in BaseHandler.get_response look for a "status_code" attribute (getattr(e, 'status_code', 500)) then

Question on ImageField width_field/height_field motivations

2010-11-27 Thread Tim Diggins
Hi there - wondering why ImageField doesn't rely on width_field and height_field (if present and populated) for the dimensions? (i.e. from ImageField's perspective these seem to be "write-only" fields). This seems pretty unperformant (moving to ridiculously unperformant if you're using a remote s