Skip to content

Commit d5633e2

Browse files
committed
Release 0.3.0
Features: Improved the Django Admin with filters and a date_hierarchy Fixes: Fix the validate_feed function, because until now it thought HTML pages were valid as well
1 parent 8da7d27 commit d5633e2

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

example/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "django-rss-filter"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
description = "Filter public RSS feeds, remove articles that contain certain keywords or categories."
55
authors = [
66
{name = "Kevin Renskers", email = "[email protected]"},

rssfilter/admin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
@admin.register(FilteredFeed)
88
class FilteredFeedAdmin(admin.ModelAdmin):
99
list_display = ["id", "created", "feed_url", "filtered_words", "filtered_categories", "view"]
10+
search_fields = ["uuid", "feed_url"]
11+
date_hierarchy = "created"
1012
ordering = ["-id"]
1113

1214
def view(self, obj):

rssfilter/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
def validate_feed(feed_url: str) -> bool:
66
try:
7-
feedparser.parse(feed_url)
7+
result = feedparser.parse(feed_url)
8+
if not result.version:
9+
return False
810
return True
911
except ValueError:
1012
return False

0 commit comments

Comments
 (0)