def occupation(request, pk):
 occupation = get_object_or_404(Occupation, pk=pk)
 return HttpResponse(('Occupation: %s' % occupation))

def occupation ( request , pk ) : occupation = get_object_or_404 ( Occupation , pk = pk ) return HttpResponse ( ( 'Occupation: %s' % occupation ) )
another really simple view to provide an endpoint for the occupation url .