diff potd/models.py @ 695:2d35e5f97a99

In process work for #50. Started a user_photos application. Initial commit with model, form, and view. The view doesn't save the photo yet.
author Brian Neal <bgneal@gmail.com>
date Sat, 07 Sep 2013 20:50:46 -0500
parents ee87ea74d46b
children eeaf387803c6
line wrap: on
line diff
--- a/potd/models.py	Fri Sep 06 21:50:53 2013 -0500
+++ b/potd/models.py	Sat Sep 07 20:50:46 2013 -0500
@@ -32,7 +32,7 @@
     thumb = models.ImageField(upload_to='potd/%Y/%m/%d/thumbs', blank=True, null=True)
     caption = models.CharField(max_length=128)
     description = models.TextField()
-    user = models.ForeignKey(User)
+    user = models.ForeignKey(User, related_name='potd_set')
     date_added = models.DateField()
     potd_count = models.IntegerField(default=0)