Python lesson: Section 12 part 19 (Creating APIs) Isn't Working

I made it to this section but every time I follow the instructions for how to make the API and type in “python3 runserver” to run the webpage, I keep getting this error "ImportError: cannot import name ‘_sanitize_token’ from ‘django.middleware.csrf’ (/Users/alecsmith/.local/share/virtualenvs/vidly-mJrVeZC4/lib/python3.10/site-packages/django/middleware/ I have no idea why, I’m following the instructions exactly.

I have exactly the same issue and I am also stuck!

Python 3.10.4
Django 4.1.1
django-tastypie 0.14.4

Please help