chore: remove logo_url from Team model

This commit is contained in:
David Larlet 2024-08-30 10:55:26 -04:00
parent 13735a5739
commit a877dd1714
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
5 changed files with 3 additions and 21 deletions

View file

@ -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)

View file

@ -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(

View file

@ -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):

View file

@ -12,9 +12,6 @@
{% if current_team.description %}
<p>{{ current_team.description }}</p>
{% endif %}
{% if current_team.logo_url %}
<p><img class="logo" src="{{ current_team.logo_url }}" /></p>
{% endif %}
</div>
</div>
<div class="map_list row">

View file

@ -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):