x = (MyModel.objects.filter(...) or [None])[0]
try:
x = MyModel.objects.get(...)
except:
x = None
You're on the right track here. get_object_or_404 is a 6 line
shortcut; writing your own get_object_or_none is an equally simple 4
line shortcut. Django doesn't have one baked in, but if you find
yourself using this idiom a lot, it's not hard to produce one
yourself.
Regarding your second use case - you may want to look into the
latest() operator on queries:
http://docs.djangoproject.com/en/dev/ref/models/querysets/#latest-field-name-none
Yours,
Russ Magee %-)