From 7cd8136260211bbbf1e762f5cba53cc8597d94cd Mon Sep 17 00:00:00 2001 From: j Date: Thu, 22 Feb 2018 19:04:39 +0530 Subject: [PATCH] fix relation --- content/migrations/0010_auto_20180222_1319.py | 2 +- content/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/migrations/0010_auto_20180222_1319.py b/content/migrations/0010_auto_20180222_1319.py index 88b331c..b927b62 100644 --- a/content/migrations/0010_auto_20180222_1319.py +++ b/content/migrations/0010_auto_20180222_1319.py @@ -44,7 +44,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='content', name='photo', - field=models.ForeignKey(blank=True, null=True, on_delete=photologue.models.Photo, related_name='main_photo', to='content.Image'), + field=models.ForeignKey(blank=True, null=True, on_delete=photologue.models.Photo, related_name='main_photo', to='photologue.Photo'), ), migrations.AlterField( model_name='content', diff --git a/content/models.py b/content/models.py index e574856..fd5a6de 100644 --- a/content/models.py +++ b/content/models.py @@ -77,7 +77,7 @@ class Content(models.Model): opttext3 = models.TextField(db_column='optText3', blank=True, null=True) # Field name made lowercase. technotes = models.TextField(db_column='technotes', blank=True, null=True) image = models.CharField(max_length=150, blank=True, null=True, editable=False) - photo = models.ForeignKey('Image', Photo, null=True, blank=True, related_name="main_photo") + photo = models.ForeignKey(Photo, null=True, blank=True, related_name="main_photo") postedby = models.CharField(db_column='postedBy', max_length=50, blank=True, null=True) # Field name made lowercase. datestart = models.DateField(db_column='dateStart', blank=True, null=True) # Field name made lowercase.