我想要熟悉这个名为django-schedule的库,有一个项目示例,他们说已启动并运行,事情是它目前没有更新到django 1.4但是有一个带有拉的叉子请求更新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
答案 0 :(得分:3)
我正在看同样的问题。我认为问题是这已被弃用:
from django.contrib.syndication.feeds import FeedDoesNotExist
应该替换为:
from django.contrib.syndication.views import FeedDoesNotExist
这让我超越了您报告的错误。