fix relation

This commit is contained in:
j 2018-02-22 19:04:39 +05:30
parent d4809e29c1
commit 7cd8136260
2 changed files with 2 additions and 2 deletions

View File

@ -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',

View File

@ -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.