diff --git a/bookwyrm/forms.py b/bookwyrm/forms.py index ee6a56679..7b18a2ffa 100644 --- a/bookwyrm/forms.py +++ b/bookwyrm/forms.py @@ -99,7 +99,7 @@ class EditUserForm(CustomForm): class Meta: model = models.User fields = [ - 'avatar', 'name', 'summary', 'manually_approves_followers' + 'avatar', 'name', 'email', 'summary', 'manually_approves_followers' ] help_texts = {f: None for f in fields} diff --git a/bookwyrm/migrations/0052_auto_20201005_2145.py b/bookwyrm/migrations/0052_auto_20201005_2145.py new file mode 100644 index 000000000..430c8358d --- /dev/null +++ b/bookwyrm/migrations/0052_auto_20201005_2145.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.7 on 2020-10-05 21:45 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('bookwyrm', '0051_auto_20201005_2142'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='email', + field=models.EmailField(blank=True, max_length=254, verbose_name='email address'), + ), + ] diff --git a/bookwyrm/models/user.py b/bookwyrm/models/user.py index 0673f53f1..0cd8b9788 100644 --- a/bookwyrm/models/user.py +++ b/bookwyrm/models/user.py @@ -18,7 +18,6 @@ class User(OrderedCollectionPageMixin, AbstractUser): ''' a user who wants to read books ''' private_key = models.TextField(blank=True, null=True) public_key = models.TextField(blank=True, null=True) - email = models.EmailField(unique=True) inbox = models.CharField(max_length=255, unique=True) shared_inbox = models.CharField(max_length=255, blank=True, null=True) federated_server = models.ForeignKey( diff --git a/bookwyrm/templates/edit_user.html b/bookwyrm/templates/edit_user.html index 1d2db7062..a95cbca2f 100644 --- a/bookwyrm/templates/edit_user.html +++ b/bookwyrm/templates/edit_user.html @@ -29,6 +29,13 @@
{{ error | escape }}
{% endfor %} ++ + {{ form.email }} + {% for error in form.email.errors %} +
{{ error | escape }}
+ {% endfor %} +