diff user_photos/models.py @ 696:b2a8fde3173a

Got the image resizing and uploading working. It needs a lot of work though. This commit is just to capture something that works.
author Brian Neal <bgneal@gmail.com>
date Sun, 08 Sep 2013 19:06:54 -0500
parents 2d35e5f97a99
children b6e98717690b
line wrap: on
line diff
--- a/user_photos/models.py	Sat Sep 07 20:50:46 2013 -0500
+++ b/user_photos/models.py	Sun Sep 08 19:06:54 2013 -0500
@@ -4,6 +4,7 @@
 
 from django.db import models
 from django.conf import settings
+from django.core.urlresolvers import reverse
 
 
 class Photo(models.Model):
@@ -19,7 +20,7 @@
                                self.upload_date.strftime('%Y-%m-%d %H:%M:%S'))
 
     def get_absolute_url(self):
-        return self.url
+        return reverse('user_photos-detail', kwargs={'pk': self.pk})
 
     def save(self, *args, **kwargs):
         if not self.pk and not self.upload_date: