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 TeamForm(forms.ModelForm):
class Meta: class Meta:
model = Team model = Team
fields = ["name", "description", "logo_url", "members"] fields = ["name", "description", "members"]
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)

View file

@ -31,15 +31,6 @@ class Migration(migrations.Migration):
"description", "description",
models.TextField(blank=True, null=True, verbose_name="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", "users",
models.ManyToManyField( models.ManyToManyField(

View file

@ -54,12 +54,6 @@ class Team(models.Model):
max_length=200, verbose_name=_("name"), unique=True, blank=False, null=False max_length=200, verbose_name=_("name"), unique=True, blank=False, null=False
) )
description = models.TextField(blank=True, null=True, verbose_name=_("description")) 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") users = models.ManyToManyField(User, related_name="teams")
def __unicode__(self): def __unicode__(self):

View file

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

View file

@ -60,9 +60,9 @@ from .forms import (
DataLayerForm, DataLayerForm,
DataLayerPermissionsForm, DataLayerPermissionsForm,
FlatErrorList, FlatErrorList,
TeamForm,
MapSettingsForm, MapSettingsForm,
SendLinkForm, SendLinkForm,
TeamForm,
UpdateMapPermissionsForm, UpdateMapPermissionsForm,
UserProfileForm, UserProfileForm,
) )
@ -191,7 +191,7 @@ about = About.as_view()
class TeamNew(CreateView): class TeamNew(CreateView):
model = Team model = Team
fields = ["name", "description", "logo_url"] fields = ["name", "description"]
success_url = reverse_lazy("user_teams") success_url = reverse_lazy("user_teams")
def form_valid(self, form): def form_valid(self, form):