From a877dd1714f756bb4a5faaee5753b6cd7c67fff9 Mon Sep 17 00:00:00 2001 From: David Larlet Date: Fri, 30 Aug 2024 10:55:26 -0400 Subject: [PATCH] chore: remove logo_url from Team model --- umap/forms.py | 2 +- umap/migrations/0022_add_team.py | 9 --------- umap/models.py | 6 ------ umap/templates/umap/team_detail.html | 3 --- umap/views.py | 4 ++-- 5 files changed, 3 insertions(+), 21 deletions(-) diff --git a/umap/forms.py b/umap/forms.py index 0ec29ccb..a6afade7 100644 --- a/umap/forms.py +++ b/umap/forms.py @@ -126,7 +126,7 @@ class TeamMembersField(forms.ModelMultipleChoiceField): class TeamForm(forms.ModelForm): class Meta: model = Team - fields = ["name", "description", "logo_url", "members"] + fields = ["name", "description", "members"] def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/umap/migrations/0022_add_team.py b/umap/migrations/0022_add_team.py index 8163c96b..8037bca3 100644 --- a/umap/migrations/0022_add_team.py +++ b/umap/migrations/0022_add_team.py @@ -31,15 +31,6 @@ class Migration(migrations.Migration): "description", models.TextField(blank=True, null=True, verbose_name="description"), ), - ( - "logo_url", - models.URLField( - help_text="URL to an image.", - verbose_name="Logo URL", - blank=True, - null=True, - ), - ), ( "users", models.ManyToManyField( diff --git a/umap/models.py b/umap/models.py index f0c786dc..e4c5e719 100644 --- a/umap/models.py +++ b/umap/models.py @@ -54,12 +54,6 @@ class Team(models.Model): max_length=200, verbose_name=_("name"), unique=True, blank=False, null=False ) description = models.TextField(blank=True, null=True, verbose_name=_("description")) - logo_url = models.URLField( - verbose_name=_("Logo URL"), - help_text=_("URL to an image."), - null=True, - blank=True, - ) users = models.ManyToManyField(User, related_name="teams") def __unicode__(self): diff --git a/umap/templates/umap/team_detail.html b/umap/templates/umap/team_detail.html index e5112376..14f86ba7 100644 --- a/umap/templates/umap/team_detail.html +++ b/umap/templates/umap/team_detail.html @@ -12,9 +12,6 @@ {% if current_team.description %}

{{ current_team.description }}

{% endif %} - {% if current_team.logo_url %} -

- {% endif %}
diff --git a/umap/views.py b/umap/views.py index 21dc174a..b7efd747 100644 --- a/umap/views.py +++ b/umap/views.py @@ -60,9 +60,9 @@ from .forms import ( DataLayerForm, DataLayerPermissionsForm, FlatErrorList, - TeamForm, MapSettingsForm, SendLinkForm, + TeamForm, UpdateMapPermissionsForm, UserProfileForm, ) @@ -191,7 +191,7 @@ about = About.as_view() class TeamNew(CreateView): model = Team - fields = ["name", "description", "logo_url"] + fields = ["name", "description"] success_url = reverse_lazy("user_teams") def form_valid(self, form):