diff --git a/civicfix/core/__pycache__/models.cpython-313.pyc b/civicfix/core/__pycache__/models.cpython-313.pyc index 9d95b66..90a4854 100644 Binary files a/civicfix/core/__pycache__/models.cpython-313.pyc and b/civicfix/core/__pycache__/models.cpython-313.pyc differ diff --git a/civicfix/core/models.py b/civicfix/core/models.py index 79b9590..34795a5 100644 --- a/civicfix/core/models.py +++ b/civicfix/core/models.py @@ -1,3 +1,4 @@ +from cloudinary.models import CloudinaryField from datetime import timedelta from django.contrib.auth.models import AbstractUser from django.core.validators import FileExtensionValidator @@ -116,11 +117,10 @@ class Issue(models.Model): latitude = models.FloatField(null=True, blank=True) longitude = models.FloatField(null=True, blank=True) - photo = models.ImageField( - upload_to="issue_photos/", + photo = CloudinaryField( + 'images', blank=True, null=True, - validators=[FileExtensionValidator(['jpg', 'jpeg', 'png', 'gif'])] ) status = models.CharField( diff --git a/civicfix/core/templates/dashboard/citizen_dashboard.html b/civicfix/core/templates/dashboard/citizen_dashboard.html index 3f8e43d..c3e011d 100644 --- a/civicfix/core/templates/dashboard/citizen_dashboard.html +++ b/civicfix/core/templates/dashboard/citizen_dashboard.html @@ -116,7 +116,7 @@ {% if issue.photo %}