I have a Django website, recently I added the RSS feed. I noticed that the resulting feed is showing the ip of the hosting instead of my domains:
<link>http://12.324.6.789/articles/</link>
Here below the code
from django.contrib.syndication.views import Feed
from django.template.defaultfilters import truncatewords
from django.urls import reverse
from django.utils.feedgenerator import Atom1Feed
class blogFeed(Feed):
title = "BLOGTITLE"
link = "/articles/"
description = "RSS feed of BLOG"
def items(self):
return ArticlePage.objects.live().order_by('-date_display')[:10]
def item_title(self, item):
return item.title
def item_link(self, item):
return item.full_url
and this route
# RSS route
path("rss/", blogFeed(), name ="feed"),
Any suggestion?