Commits

Josh VanderLinden committed 5a7d273

Added some useful information to attachments.

Comments (0)

Files changed (2)

articles/__init__.py

-__version__ = '2.0.0-pre2'
+__version__ = '2.0.1-pre1'
 
 """
 The Pygments reStructuredText directive

articles/models.py

     attachment = models.FileField(upload_to=upload_to)
     caption = models.CharField(max_length=255, blank=True)
 
+    class Meta:
+        ordering = ('-article', 'pk')
+
+    def __unicode__(self):
+        return u'%s: %s' % (self.article, self.caption)
+
     @property
     def filename(self):
         return self.attachment.name.split('/')[-1]