Module 'collections' has no attribute 'MutableMapping'

i am trying to upload images from admin page to the data base, in django project i have configured and i have tried many ways to fix this but doesn't worked please guide me:-

settings.py

MEDIA_URL = '/media/'
MEDIA_ROOT = str(BASE_DIR / 'media')

urls.py

 urlpatters[...] + static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)

models.py

    product_img = models.ImageField('Product Image', upload_to = 'product_img', blank=True  )

docker file

FROM python:3.9.7-alpine3.14

ENV PYTHONUNBUFFERED 1

RUN mkdir /app
WORKDIR /app

COPY requirement.txt /app/
RUN pip3 install -r requirement.txt

COPY . /app/

requirments.txt

Django==3.2.9
Pillow==2.2.1
Back to Top