Open meshy opened 7 years ago
We have only one route:
route = Route.objects.create(url='/anything/')
If we call route.get_parent()
, do we get None
? Would it be more sane to raise DoesNotExist
?
We have only two routes:
r1 = Route.objects.create(url='/')
r2 = Route.objects.create(url='/nested/twice/')
If we call r2.get_parent()
, do we get r1
?
We have
get_ancestors
, but we can't so easily get the immediate one.