Skip to content

Commit

Permalink
Turn on keyword/topic report for everyone
Browse files Browse the repository at this point in the history
This isn't useful for everyone but we'll see if we get any feedback
  • Loading branch information
davidfischer committed Sep 5, 2024
1 parent 9a892aa commit 168b995
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 70 deletions.
45 changes: 0 additions & 45 deletions adserver/migrations/0097_ui_advertiser_reports.py

This file was deleted.

9 changes: 0 additions & 9 deletions adserver/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,15 +612,6 @@ class Advertiser(TimeStampedModel, IndestructibleModel):
default=None,
)

show_keyword_report = models.BooleanField(
default=False,
help_text=_("Show the link to the Keyword Report in the advertiser dashboard"),
)
show_topic_report = models.BooleanField(
default=False,
help_text=_("Show the link to the Topic Report in the advertiser dashboard"),
)

# Deprecated - will migration to `customer`
stripe_customer_id = models.CharField(
_("Stripe Customer ID"), max_length=200, blank=True, null=True, default=None
Expand Down
5 changes: 0 additions & 5 deletions adserver/templates/adserver/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ <h6 class="text-muted">{{ advertiser }}</h6>
<span>{% trans 'Publishers' %}</span>
</a>
</li>
{% if request.user.is_staff or advertiser.show_keyword_report %}
<li class="nav-item">
<a
class="nav-link"
Expand All @@ -115,9 +114,6 @@ <h6 class="text-muted">{{ advertiser }}</h6>
<span>{% trans 'Keywords' %}</span>
</a>
</li>
{% endif %}

{% if request.user.is_staff or advertiser.show_topic_report %}
<li class="nav-item">
<a
class="nav-link"
Expand All @@ -128,7 +124,6 @@ <h6 class="text-muted">{{ advertiser }}</h6>
<span>{% trans 'Topics' %}</span>
</a>
</li>
{% endif %}

<li class="nav-item">
<a class="nav-link" href="{% url 'advertiser_users' advertiser.slug %}">
Expand Down
11 changes: 0 additions & 11 deletions adserver/tests/test_advertiser_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,6 @@ def test_advertiser_overview(self):
)
self.assertContains(response, f"Month to date overview for {self.advertiser.name}")

self.assertNotContains(response, f"/advertiser/{self.advertiser.slug}/report/topics/")
self.assertNotContains(response, f"/advertiser/{self.advertiser.slug}/report/keywords/")

self.advertiser.show_keyword_report = True
self.advertiser.show_topic_report = True
self.advertiser.save()

response = self.client.get(url)
self.assertContains(response, f"/advertiser/{self.advertiser.slug}/report/topics/")
self.assertContains(response, f"/advertiser/{self.advertiser.slug}/report/keywords/")

def test_flight_list_view(self):
url = reverse("flight_list", kwargs={"advertiser_slug": self.advertiser.slug})

Expand Down

0 comments on commit 168b995

Please sign in to comment.