Often I find myself wanting to get the first object from a queryset in Django, or return None if there aren\'t any. There are lots of ways to do this which all
None
r = list(qs[:1]) if r: return r[0] return None