Re: Add support for get_or_none?

2014-03-26 Thread Paulo Poiati
for a framework, but in common cases, like link the above, I think it’s ok. I agree with some guys here, in the case of #get_or_none, manager#first almost always fit the role. So, I’m neutral in regard of that. —  []’s Paulo Poiati blog.paulopoiati.com On March 26, 2014 at 12:24:21 PM, Wim

Re: Proposal: update_fields shortcut

2014-03-05 Thread Paulo Poiati
shortcut for a use case of QuerySet#filter? Isn’t QuerySet#first() just sugar to QuerySet[0]? What about the django.shortcuts module? Don’t get me wrong, I enjoy the python philosophy, but I think it’s more a guideline than a law. []’s Paulo Poiati blog.paulopoiati.com -- You received

Re: Proposal: update_fields shortcut

2014-03-05 Thread Paulo Poiati
… ... from model_utils.fields import MonitorField class Invoice(model.Model): ... paid_at = MonitorField(monitor='paid') def pay(self): self.update_fields(paid=True) []’s Paulo Poiati blog.paulopoiati.com -- You received this message because you are subscribed to the Google Group

Proposal: update_fields shortcut

2014-03-05 Thread Paulo Poiati
t.update_fields(name='Name changed again') What do you guys think about this? []’s Paulo Poiati blog.paulopoiati.com -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving