You could optionally use the `SlugOrIdMixin` to do this for you. **And** it'd support slugs.