Remove RSS support
"Adding features without removing them is"
This commit is contained in:
parent
4ab86115fc
commit
b4b20eca12
|
@ -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
|
|
@ -11,7 +11,6 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<link rel="alternate" href="/feed" type="application/rss+xml" title="RSS">
|
||||
{% if not first_page %}
|
||||
<link rel="canonical" href="/?page={{ current_page_slug }}">
|
||||
{% else %}
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.conf.urls.static import static
|
|||
from django.urls import path, include
|
||||
|
||||
from thoughts import views
|
||||
from thoughts.feed import MainFeed
|
||||
from whispermaphone import settings
|
||||
|
||||
urlpatterns = [
|
||||
|
@ -10,6 +9,5 @@ urlpatterns = [
|
|||
path("about", views.about, name="about"),
|
||||
path("login", views.login, name="login"),
|
||||
path("post", views.post, name="post"),
|
||||
path("feed", MainFeed()),
|
||||
path("search", views.search, name="thoughts_search")
|
||||
] + (static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG else [])
|
||||
|
|
Loading…
Reference in New Issue