Skip to content

Commit

Permalink
Merge pull request #32 from blag/use-django-emailfield
Browse files Browse the repository at this point in the history
Use Django's built-in EmailField
  • Loading branch information
stephenmcd committed Mar 20, 2017
2 parents a1412ed + 4e021f8 commit fbeb657
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions email_extras/migrations/0004_use_djangos_emailfield.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-17 22:35
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('email_extras', '0003_auto_20161103_0315'),
]

operations = [
migrations.AlterField(
model_name='address',
name='address',
field=models.EmailField(blank=True, max_length=254),
),
]
2 changes: 1 addition & 1 deletion email_extras/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Meta:
verbose_name = _("Address")
verbose_name_plural = _("Addresses")

address = models.CharField(max_length=200, default='')
address = models.EmailField(blank=True)
key = models.ForeignKey('email_extras.Key', null=True, editable=False)
use_asc = models.BooleanField(default=False, editable=False)

Expand Down

0 comments on commit fbeb657

Please sign in to comment.