Fixes email max length
This commit is contained in:
1 parent
26bce8af7f
commit
e7e4dc82a2
3 files changed
+41
-4
No files matched your search
@@ -1,6 +1,11 @@
|
||||
# Install
|
||||
virtualenv venv
|
||||
. venv/bin/activate
|
||||
pip install -r requirements
|
||||
|
||||
# TODO
|
||||
- Fabfile with deploy task
|
||||
- Alias should only allow unique (source,destination) tuples
|
||||
|
||||
# TODO later
|
||||
- Create domain dir for dovecot?
|
||||
- Create domain dir for dovecot?
|
||||
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('dpdapi', '0002_auto_20150107_0309'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='alias',
|
||||
name='destination',
|
||||
field=models.EmailField(max_length=254),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='alias',
|
||||
name='source',
|
||||
field=models.EmailField(max_length=254),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='email',
|
||||
field=models.EmailField(unique=True, max_length=254),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
||||
+3
-3
@@ -11,8 +11,8 @@ class BaseModel(models.Model):
|
||||
|
||||
|
||||
class Alias(BaseModel):
|
||||
source = models.EmailField()
|
||||
destination = models.EmailField()
|
||||
source = models.EmailField(max_length=254)
|
||||
destination = models.EmailField(max_length=254)
|
||||
domain = models.ForeignKey('dpdapi.Domain')
|
||||
active = models.BooleanField(default=True)
|
||||
|
||||
@@ -31,7 +31,7 @@ class Domain(BaseModel):
|
||||
|
||||
|
||||
class User(BaseModel):
|
||||
email = models.EmailField(unique=True)
|
||||
email = models.EmailField(max_length=254, unique=True)
|
||||
password = models.CharField(max_length=109)
|
||||
domain = models.ForeignKey('dpdapi.Domain')
|
||||
|
||||
|
||||
Reference in new issue
Block a user