1

有一个我想熟悉的名为 django-schedule 的库,他们说有一个项目示例已经启动并正在运行,问题是它当前没有更新到 django 1.4,但是有一个带有拉取请求的 fork 更新它https://github.com/Natim/django-schedule

但是当运行它时,我得到一个错误,我认为这是

(r'^schedule/', include('schedule.urls')), 

我用 setup.py 安装了你认为我必须做什么才能让它运行起来?

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/

Django Version: 1.4.2
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'schedule')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/handlers/base.py" in get_response
  89.                     response = middleware_method(request)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/middleware/locale.py" in process_request
  21.         check_path = self.is_language_prefix_patterns_used()
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/middleware/locale.py" in is_language_prefix_patterns_used
  54.         for url_pattern in get_resolver(None).url_patterns:
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/urlresolvers.py" in url_patterns
  328.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/core/urlresolvers.py" in urlconf_module
  323.             self._urlconf_module = import_module(self.urlconf_name)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/brian/code/django-schedule/project_sample/../project_sample/urls.py" in <module>
  10.     (r'^schedule/', include('schedule.urls')),
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/conf/urls/__init__.py" in include
  24.         urlconf_module = import_module(urlconf_module)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/Django-1.4.2-py2.7.egg/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/django_schedule-0.5b-py2.7.egg/schedule/urls.py" in <module>
  4. from schedule.feeds import UpcomingEventsFeed
File "/home/brian/virt_env/virt_step/local/lib/python2.7/site-packages/django_schedule-0.5b-py2.7.egg/schedule/feeds/__init__.py" in <module>
  2. from django.contrib.syndication.feeds import FeedDoesNotExist

Exception Type: ImportError at /
Exception Value: No module named feeds
4

1 回答 1

3

我在看同样的问题。我认为问题在于这已被弃用:

from django.contrib.syndication.feeds import FeedDoesNotExist

并且应该替换为:

from django.contrib.syndication.views import FeedDoesNotExist

这使我摆脱了您报告的错误。

于 2012-11-03T15:32:26.573 回答