refactor(images): Reference model directly in ForeignKey definitions

This also works around a Django bug: https://code.djangoproject.com/ticket/25858
pull/1990/merge
Karl Hobley 2015-12-03 14:51:10 +00:00 zatwierdzone przez Matt Westcott
rodzic 2b38263fba
commit 7f97b05f1a
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -438,7 +438,7 @@ class Filter(models.Model):
class AbstractRendition(models.Model):
filter = models.ForeignKey('Filter', related_name='+')
filter = models.ForeignKey(Filter, related_name='+')
file = models.ImageField(upload_to='images', width_field='width', height_field='height')
width = models.IntegerField(editable=False)
height = models.IntegerField(editable=False)
@ -485,7 +485,7 @@ class AbstractRendition(models.Model):
class Rendition(AbstractRendition):
image = models.ForeignKey('Image', related_name='renditions')
image = models.ForeignKey(Image, related_name='renditions')
class Meta:
unique_together = (