Function decorator for Django REST Framework for specifying and constraining API parameters