Skip to content

Commit

Permalink
Serve CSV template through staticfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfischer committed Nov 4, 2024
1 parent 036827d commit 478f4e3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1>{% block heading %}{% trans 'Bulk create ads' %}{% endblock heading %}</h1>
<div class="col-md-8">

{% if not preview_ads %}
{% url 'advertiser_bulk_create_template' as bulk_create_template_url %}
{% static 'advertisement-bulk-create-template.csv' as bulk_create_template_url %}
<p class="mb-2">{% blocktrans %}Create multiple ads for your flight by uploading a CSV file. Download the <a href="{{ bulk_create_template_url }}">CSV template</a> and upload it with your ads.{% endblocktrans %}</p>

<p class="mb-5">{% trans 'For tips on crafting high-performing ads across EthicalAds, see our <a target="_blank" href="https://www.ethicalads.io/downloads/ethicalads-creatives-that-convert.pdf">"creatives that convert" guide</a>.' %}</p>
Expand Down
8 changes: 0 additions & 8 deletions adserver/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,6 @@
name="publisher_uplift_report_export",
),
# Advertiser management and reporting
path(
r"advertiser/advertisement-bulk-create-template.csv",
TemplateView.as_view(
template_name="adserver/advertiser/advertisement-bulk-create-template.csv",
content_type="text/csv",
),
name="advertiser_bulk_create_template",
),
path(
r"advertiser/<slug:advertiser_slug>/",
AdvertiserMainView.as_view(),
Expand Down
1 change: 1 addition & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "assets", "dist"),
os.path.join(BASE_DIR, "assets", "img"),
os.path.join(BASE_DIR, "assets", "files"),
]


Expand Down

0 comments on commit 478f4e3

Please sign in to comment.