We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5cf9a2 commit c760792Copy full SHA for c760792
1 file changed
ietf/utils/models.py
@@ -15,4 +15,14 @@ class VersionInfo(models.Model):
15
used = models.BooleanField(default=True)
16
class Meta:
17
verbose_name_plural = 'VersionInfo'
18
+
19
+class ForeignKey(models.ForeignKey):
20
+ "A local ForeignKey proxy which provides the on_delete value required under Django 2.0."
21
+ def __init__(self, to, on_delete=models.CASCADE, **kwargs):
22
+ return super(ForeignKey, self).__init__(to, on_delete=on_delete, **kwargs)
23
24
+class OneToOneField(models.OneToOneField):
25
+ "A local OneToOneField proxy which provides the on_delete value required under Django 2.0."
26
27
+ return super(OneToOneField, self).__init__(to, on_delete=on_delete, **kwargs)
28
0 commit comments