Remove RSS support

"Adding features without removing them is"
This commit is contained in:
Matthias Portzel 2022-09-04 15:10:51 -04:00
parent 4ab86115fc
commit b4b20eca12
3 changed files with 0 additions and 27 deletions

View File

@ -1,24 +0,0 @@
from django.contrib.syndication.views import Feed
from thoughts.models import Thought
class MainFeed(Feed):
title = "Thoughts"
link = "/"
@staticmethod
def items():
return Thought.objects.all().order_by("-posted")
def item_title(self, item):
return item.text
def item_description(self, item):
return item.extended_text
def item_link(self, item):
return "/?show=" + str(item.uuid)
def item_pubdate(self, item):
return item.posted

View File

@ -11,7 +11,6 @@
{% endblock %} {% endblock %}
{% block head %} {% block head %}
<link rel="alternate" href="/feed" type="application/rss+xml" title="RSS">
{% if not first_page %} {% if not first_page %}
<link rel="canonical" href="/?page={{ current_page_slug }}"> <link rel="canonical" href="/?page={{ current_page_slug }}">
{% else %} {% else %}

View File

@ -2,7 +2,6 @@ from django.conf.urls.static import static
from django.urls import path, include from django.urls import path, include
from thoughts import views from thoughts import views
from thoughts.feed import MainFeed
from whispermaphone import settings from whispermaphone import settings
urlpatterns = [ urlpatterns = [
@ -10,6 +9,5 @@ urlpatterns = [
path("about", views.about, name="about"), path("about", views.about, name="about"),
path("login", views.login, name="login"), path("login", views.login, name="login"),
path("post", views.post, name="post"), path("post", views.post, name="post"),
path("feed", MainFeed()),
path("search", views.search, name="thoughts_search") path("search", views.search, name="thoughts_search")
] + (static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG else []) ] + (static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG else [])