Issue
The installation was done correctly and appears in (venv).
requirements:
asgiref==3.7.2
Django==4.2.8
fontawesomefree==6.5.1
pillow==10.2.0
psycopg2==2.9.9
psycopg2-binary==2.9.9
sqlparse==0.4.4
typing_extensions==4.8.0
tzdata==2023.3
(venv) PS C:\\Users\\adminufpi\\PycharmProjects\\setorT\> python -m pip
show Pillow
Name: pillow
Version: 10.2.0
Summary: Python Imaging Library (Fork)
Home-page:
Author:
Author-email: "Jeffrey A. Clark (Alex)" <mailto:[email protected]>
License: HPND
Location: c:\\users\\adminufpi\\pycharmprojects\\setort\\venv\\lib\\site-packages
Requires:
Required-by:
model:
class Manutencao(models.Model):
id = models.BigAutoField(primary_key=True)
veiculo = models.ForeignKey(Veiculo, on_delete=models.CASCADE)
data = models.DateField(null=False)
descricao_manutencao = models.TextField(max_length=100, null=False)
comprovante_manutencao = models.ImageField(
upload_to='comprovantes/manutenções/', null=False)
def __str__(self):
return f"{self.veiculo} - Data: {self.data}"
error:
SystemCheckError: System check identified some issues:
ERRORS: sistema_gerenciamento.Manutencao.comprovante_manutencao: (fields.E210) Cannot use ImageField because Pillow is not installed.
HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command "python -m pip install Pillow".
Django doesn't find the pillow even though it was installed correctly, any tips on how I can solve this problem?
Solution
Problem solved, as I was running django through Docker, the solution was to build the project again:
docker compose up --build .
Answered By - Hian
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.