⬆️Django 2.x

This commit is contained in:
Nikolai R Kristiansen committed 2018-03-17 13:09:43 +01:00
1 parent 70be41df96
commit 8c0c84eb49
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -46,7 +46,7 @@ class Migration(migrations.Migration):
('updated', models.DateTimeField(auto_now=True)),
('email', models.EmailField(unique=True, max_length=254)),
('password', models.CharField(max_length=109)),
('domain', models.ForeignKey(to='dpdapi.Domain')),
('domain', models.ForeignKey(to='dpdapi.Domain', on_delete=models.CASCADE)),
],
options={
'abstract': False,
@@ -56,7 +56,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='alias',
name='domain',
field=models.ForeignKey(to='dpdapi.Domain'),
field=models.ForeignKey(to='dpdapi.Domain', on_delete=models.CASCADE),
preserve_default=True,
),
]
+2 -2
View File
@@ -12,7 +12,7 @@ class BaseModel(models.Model):
class Alias(BaseModel):
source = models.EmailField(max_length=254)
destination = models.EmailField(max_length=254)
domain = models.ForeignKey('dpdapi.Domain')
domain = models.ForeignKey('dpdapi.Domain', models.CASCADE)
active = models.BooleanField(default=True)
def __str__(self):
@@ -44,7 +44,7 @@ class Domain(BaseModel):
class User(BaseModel):
email = models.EmailField(max_length=254, unique=True)
password = models.CharField(max_length=109)
domain = models.ForeignKey('dpdapi.Domain')
domain = models.ForeignKey('dpdapi.Domain', models.CASCADE)
def __str__(self):
return self.email
+1 -1
View File
@@ -1,4 +1,4 @@
Django==1.11.11
Django==2.0.3
django-extensions==2.0.6
django-filter==1.1.0
djangorestframework==3.7.7