make it like django rest resource