Skip to content

Commit

Permalink
Format cube names
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelglenister committed Mar 14, 2024
1 parent b0e3eea commit f2e0347
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions municipal_finance/templates/docs.html
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layout.html" %}
{% load pipeline %}
{% load lookup %}
{% load staticfiles %}
{% load staticfiles format_cube_name %}

{% block title %}Municipal Finance API Documentation{% endblock %}

Expand Down Expand Up @@ -174,7 +174,7 @@ <h1 id="bulkdownloads">Bulk Downloads</h1>
<table class="bulk-downloads">
{% for key, value in bulk_downloads.items %}
<tr class="bulk-downloads">
<td colspan="3">{{ key }} (<a href="{{ storage_url }}/{{ key }}/index.json" target=”_blank”>Metadata</a>)</td>
<td colspan="3">{{ key|format_cube_name }} (<a href="{{ storage_url }}/{{ key }}/index.json" target=”_blank”>Metadata</a>)</td>
</tr>
{% for file_key, file_year in value.files.items %}
<tr class="attribute">
Expand Down
8 changes: 8 additions & 0 deletions municipal_finance/templatetags/format_cube_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import dateutil
from django import template

register = template.Library()

@register.filter
def format_cube_name(value):
return value.replace("_", " ")

0 comments on commit f2e0347

Please sign in to comment.