12π
β
Itβs basic Python that in order to use anything you need to either define it or import it in the current model. In your case, you need to do from django.core.validators import RegexValidator
at the top of your models file.
For the second one, the error message tells you all you need to know: you need to install Pillow or (less preferably) PIL in your system. The documentation for ImageField mentions this and has the relevant links.
π€Daniel Roseman
8π
You might need to import it
from django.core.validators import RegexValidator
also you need to install Pillow before you can use it
π€Dr.Elch
- [Django]-Running Gunicorn behind chrooted nginx inside virtualenv
- [Django]-Django migration dependency order
- [Django]-Dynamic SEO-friendly URLs
Source:stackexchange.com