Я хочу получить URL из модели класса FeedSource, чтобы сохранить ленту на моем сайте
В models.py
class FeedSource(models.Model):
url = models.URLField(max_length=400, blank=True)
is_active = models.BooleanField(default=False)
class Feed(models.Model):
feedsource = models.ForeignKey(FeedSource, on_delete=models.CASCADE, null=True)
author = models.CharField(max_length=250)
В apps.py
from feed.models import Feed, FeedSource
import feedparser
d = feedparser.parse('http://feeds.feedburner.com/abc/')
Я ожидаю, что выходные данные получат URL из модели FeedSource и сохранят ленту на моем сайте. Но я сделал это с помощью ручного URL:
d = feedparser.parse('http://feeds.feedburner.com/abc/')