]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/photo/models.py
Update to work with newer django and python3
[sommitrealweird.git] / sommitrealweird / photo / models.py
index 31751c3b262efdef8e729ac307f20f215f89b823..7bf1137394662cccac2a75200ee8528b330c7123 100644 (file)
@@ -16,6 +16,9 @@ class Album(models.Model):
     def __unicode__(self):
         return "%s" %(self.name,)
 
+    def __str__(self):
+        return "%s" %(self.name,)
+
 def get_upload_path(photo, filename):
     if photo.album:
         return "photos/%s/%s" %(photo.album.slug, filename)
@@ -30,3 +33,6 @@ class Photo(models.Model):
 
     def __unicode__(self):
         return "%s" %(self.image)
+
+    def __str__(self):
+        return "%s" %(self.image)