FileField should be a context manager

2011-12-08 Thread Martin Chase
pen() as a_file: a_file.read() Any reason I shouldn't make a ticket and patch for this? - Martin Chase -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com.

QuerySet.as_manager doesn't offer a way to use_for_related_fields

2014-12-30 Thread Martin Chase
r honor a class attr of the same name on the queryset. Is this a reasonable improvement? Is one of those possible implementations (or a completely different one) better? Regards, Martin Chase -- You received this message because you are subscribed to the Google Groups "Django developers (C

Re: QuerySet.as_manager doesn't offer a way to use_for_related_fields

2014-12-31 Thread Martin Chase
Hey Marcus, Thanks for the ideas. I haven't tested it, but the second solution is specifically mentioned as not working in the docs: https://docs.djangoproject.com/en/1.7/topics/db/managers/#set-use-for-related-fields-when-you-define-the-class Your first solution is what I have in place now (spe