Skip to content

Commit

Permalink
fixup! bug-1908868: Use structured configuration for backends.
Browse files Browse the repository at this point in the history
  • Loading branch information
smarnach committed Jul 24, 2024
1 parent 0ef6ad6 commit afb7052
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tecken/base/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ def clean_url(value):
context["settings"].append({"key": key, "value": value})
context["settings"].sort(key=lambda x: x["key"])

context["backends"] = symbolstorage.SYMBOL_STORAGE.get_download_backends(True)
context["backends"] = [
(backend.__class__.__name__, backend)
for backend in symbolstorage.SYMBOL_STORAGE.get_download_backends(True)
]

# Get some table counts
tables = [
Expand Down
4 changes: 3 additions & 1 deletion tecken/base/templates/admin/site_status.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ <h2>Backends</h2>
<table>
<thead>
<tr>
<th>class</th>
<th>bucket</th>
<th>prefix</th>
<th>try_symbols</th>
</tr>
</thead>
<tbody>
{% for item in backends %}
{% for class_name, item in backends %}
<tr>
<td>{{ class_name }}</td>
<td>{{ item.bucket }}</td>
<td>{{ item.prefix }}</td>
<td>{{ item.try_symbols }}</td>
Expand Down

0 comments on commit afb7052

Please sign in to comment.