- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我已经将我的 Django 版本更新到最新的 nightly,我在管理员中收到以下错误;
Could not import django.contrib.syndication.views.feed. View does not exist in module django.contrib.syndication.views.
I had this error in several views too because, indeed, django.contrib.syndication.views.feed
was deprecated and has been removed.
I only had to add a
from django.contrib.syndication.views import Feed
与
from django.contrib.syndication.feeds import Feed
问题是我在任何地方都找不到对 django.contrib.syndication.views.feed
的任何引用,甚至在 Django 源代码中也找不到,所以我不明白错误是从哪里来的从以及如何解决它。
错误的直接来源是
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/urlresolvers.py in get_callable, line 100
但我在那里也找不到任何东西。
希望有人能帮忙!
最佳答案
user643511建议错误可能在我自己的代码中,而不是 Django。但是她没有指出真正的问题(我理解,因为我没有提供正确的信息)。经过几天的挖掘,我发现我有
url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
在 urls.py 中。相反,我不得不使用
url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.Feed', {'feed_dict': feeds}),
注意 views.Feed 中的大写字母 F。
因此,如果有人遇到类似问题,请检查 urls.py。
关于python - 如何解决 Django 管理中的 "Could not import django.contrib.syndication.views.feed"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6642829/
我正在调查 Argotic Syndication Framework ,到目前为止,我印象非常深刻。然而,目前的很多实现——至少对于 RSS 和 Atom——seem pretty comparab
我正在尝试构建一个新闻提要应用程序,但在格式化结果时遇到了问题。我确定问题只是缺乏经验。我遇到的主要问题有两个。第一个是项目.summary.text 在摘要之后拉出一堆链接。 我遇到的另一个问题是将
我正在尝试解决一个错误,即我在 http://captainobvio.us 生成的所有 RSS 提要在 Internet Explorer(版本 8 和 9)中产生以下错误: Feed code e
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl类的一些代码示例,展示了YWeatherModuleI
本文整理了Java中com.sun.syndication.feed.module.base.types.YearType类的一些代码示例,展示了YearType类的具体用法。这些代码示例主要来源于G
.NET 中的 SyndicationFeed 类似乎只支持 RSS 2.0 版。我该如何支持 RSS 0.91 版? 最佳答案 简而言之,您需要创建一个类来处理 RSS 0.91 标准的序列化和反序
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.getLocation()方法的一些代码示例,展示了
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.setAtmosphere()方法的一些代码示例,展
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.setUnits()方法的一些代码示例,展示了YWe
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.()方法的一些代码示例,展示了YWeatherMod
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.getAtmosphere()方法的一些代码示例,展
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.getForecasts()方法的一些代码示例,展示
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.getUnits()方法的一些代码示例,展示了YWe
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.getWind()方法的一些代码示例,展示了YWea
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.setForecasts()方法的一些代码示例,展示
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.setAstronomy()方法的一些代码示例,展示
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.setLocation()方法的一些代码示例,展示了
本文整理了Java中com.sun.syndication.feed.module.yahooweather.YWeatherModuleImpl.getCondition()方法的一些代码示例,展示
将项目从 vs2008 更新到 vs2010 后尝试编译我的 asp.net 站点时出现以下错误 命名空间“System.ServiceModel”中不存在类型或命名空间名称“Syndication”
本文整理了Java中com.sun.syndication.feed.module.base.types.YearType.toString()方法的一些代码示例,展示了YearType.toStri
我是一名优秀的程序员,十分优秀!