1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #11826: RSS feed widget (#11976)

* Add feedparser as a dependency

* Introduce RSSFeedWidget

* Clean up widget templates
This commit is contained in:
Jeremy Stretch
2023-03-14 11:59:27 -04:00
committed by GitHub
parent af63ac693e
commit 8bd0a2ef9d
7 changed files with 85 additions and 3 deletions

View File

@@ -30,7 +30,7 @@
<strong>{{ widget.title }}</strong>
{% endif %}
</div>
<div class="card-body p-2">
<div class="card-body p-2 overflow-auto">
{% render_widget widget %}
</div>
</div>

View File

@@ -4,6 +4,7 @@
{% csrf_token %}
<div class="modal-header">
<h5 class="modal-title">Add a Widget</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
{% block form %}

View File

@@ -0,0 +1,13 @@
<div class="list-group list-group-flush">
{% for entry in feed.entries %}
<div class="list-group-item px-1">
<h6><a href="{{ entry.link }}">{{ entry.title }}</a></h6>
<div>
{{ entry.summary|safe }}
</div>
</div>
{% empty %}
<div class="list-group-item text-muted">No content found</div>
{% endfor %}
</div>