Add the "to=" keyword argument to all ForeignKey, ManayToMany and OneToOne Fields.

Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
Michael Price
2018-04-01 20:49:04 -04:00
committed by Roberto Rosario
parent 038cd30960
commit 53239385ae
20 changed files with 176 additions and 174 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ class SmartLink(models.Model):
)
enabled = models.BooleanField(default=True, verbose_name=_('Enabled'))
document_types = models.ManyToManyField(
DocumentType, verbose_name=_('Document types')
to=DocumentType, verbose_name=_('Document types')
)
objects = SmartLinkManager()
@@ -105,7 +105,7 @@ class ResolvedSmartLink(SmartLink):
@python_2_unicode_compatible
class SmartLinkCondition(models.Model):
smart_link = models.ForeignKey(
SmartLink, on_delete=models.CASCADE, related_name='conditions',
on_delete=models.CASCADE, related_name='conditions', to=SmartLink,
verbose_name=_('Smart link')
)
inclusion = models.CharField(