From 7fcb112d008022a9355838c409a97686aba61e79 Mon Sep 17 00:00:00 2001 From: sebgrebe <15908208+sebgrebe@users.noreply.github.com> Date: Wed, 3 Apr 2024 21:16:03 +0200 Subject: [PATCH] remove unnecessary migration files --- ...0010_alter_localgroup_local_group_types.py | 21 -------- eahub/localgroups/views.py | 4 +- .../migrations/0029_auto_20240331_1457.py | 48 ------------------- eahub/tests/e2e/test_signup.py | 3 -- 4 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 eahub/localgroups/migrations/0010_alter_localgroup_local_group_types.py delete mode 100644 eahub/profiles/migrations/0029_auto_20240331_1457.py diff --git a/eahub/localgroups/migrations/0010_alter_localgroup_local_group_types.py b/eahub/localgroups/migrations/0010_alter_localgroup_local_group_types.py deleted file mode 100644 index 925e88605..000000000 --- a/eahub/localgroups/migrations/0010_alter_localgroup_local_group_types.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 3.2.15 on 2024-03-31 14:57 - -import django.contrib.postgres.fields -from django.db import migrations -import django_enumfield.db.fields -import eahub.localgroups.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('localgroups', '0009_localgroup_region'), - ] - - operations = [ - migrations.AlterField( - model_name='localgroup', - name='local_group_types', - field=django.contrib.postgres.fields.ArrayField(base_field=django_enumfield.db.fields.EnumField(enum=eahub.localgroups.models.LocalGroupType), blank=True, default=list, size=None), - ), - ] diff --git a/eahub/localgroups/views.py b/eahub/localgroups/views.py index 932d21721..b40798d14 100644 --- a/eahub/localgroups/views.py +++ b/eahub/localgroups/views.py @@ -7,7 +7,7 @@ from django.contrib.auth.decorators import login_required from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDenied -from django.core.mail import EmailMultiAlternatives, send_mail, EmailMessage +from django.core.mail import EmailMultiAlternatives, send_mail from django.http import Http404, HttpResponse from django.shortcuts import get_object_or_404, redirect from django.template.loader import render_to_string @@ -145,7 +145,7 @@ def form_valid(self, form): } ) - email = EmailMessage( + email = EmailMultiAlternatives( f"{sender_name} sent you a message", message, settings.DEFAULT_FROM_EMAIL, diff --git a/eahub/profiles/migrations/0029_auto_20240331_1457.py b/eahub/profiles/migrations/0029_auto_20240331_1457.py deleted file mode 100644 index 8050f19f8..000000000 --- a/eahub/profiles/migrations/0029_auto_20240331_1457.py +++ /dev/null @@ -1,48 +0,0 @@ -# Generated by Django 3.2.15 on 2024-03-31 14:57 - -import django.contrib.postgres.fields -from django.db import migrations -import django_enumfield.db.fields -import eahub.profiles.legacy -import eahub.profiles.models -import enumfields.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('profiles', '0028_add_privacy_policy_agreed'), - ] - - operations = [ - migrations.AlterField( - model_name='profile', - name='career_interest_areas', - field=django.contrib.postgres.fields.ArrayField(base_field=django_enumfield.db.fields.EnumField(enum=eahub.profiles.legacy.ExpertiseArea), blank=True, default=list, size=None), - ), - migrations.AlterField( - model_name='profile', - name='cause_areas', - field=django.contrib.postgres.fields.ArrayField(base_field=django_enumfield.db.fields.EnumField(enum=eahub.profiles.legacy.CauseArea), blank=True, default=list, size=None), - ), - migrations.AlterField( - model_name='profile', - name='expertise_areas', - field=django.contrib.postgres.fields.ArrayField(base_field=django_enumfield.db.fields.EnumField(enum=eahub.profiles.legacy.ExpertiseArea), blank=True, default=list, size=None), - ), - migrations.AlterField( - model_name='profile', - name='giving_pledges', - field=django.contrib.postgres.fields.ArrayField(base_field=django_enumfield.db.fields.EnumField(enum=eahub.profiles.legacy.GivingPledge), blank=True, default=list, size=None), - ), - migrations.AlterField( - model_name='profile', - name='organisational_affiliations', - field=django.contrib.postgres.fields.ArrayField(base_field=django_enumfield.db.fields.EnumField(enum=eahub.profiles.legacy.OrganisationalAffiliation), blank=True, default=list, size=None), - ), - migrations.AlterField( - model_name='profile', - name='visibility', - field=enumfields.fields.EnumField(default='public', enum=eahub.profiles.models.VisibilityEnum, max_length=16, verbose_name='Profile visibility'), - ), - ] diff --git a/eahub/tests/e2e/test_signup.py b/eahub/tests/e2e/test_signup.py index b6784b0e2..4cb2bd0c6 100644 --- a/eahub/tests/e2e/test_signup.py +++ b/eahub/tests/e2e/test_signup.py @@ -10,9 +10,6 @@ def test_signup(self): user_email = "test@eahub.org" user_password = "Wa4@;fh>A/~W#6SH" - print("LIVE SERVER URL") - print(self.live_server_url) - self.selenium.get(self.live_server_url) self.find("#signup-btn").click()