請幫助修復錯誤如何擴展插件?
在django cms中添加了插件民意調查。然後嘗試擴展它爲這個tutorial。由於我的目錄結構看起來像是like。
的問題是,當你嘗試運行網站控制檯顯示以下錯誤消息:
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
return self.application(environ, start_response)
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 187, in __call__
self.load_middleware()
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware
mw_instance = mw_class()
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/middleware/locale.py", line 24, in __init__
for url_pattern in get_resolver(None).url_patterns:
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 365, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 360, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/kalinins/.virtualenvs/blogik4/blogik4/blogik4/urls.py", line 8, in <module>
admin.autodiscover()
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 29, in autodiscover
import_module('%s.admin' % app)
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/cms/admin/__init__.py", line 11, in <module>
plugin_pool.plugin_pool.discover_plugins()
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/cms/plugin_pool.py", line 36, in discover_plugins
load('cms_plugins')
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/cms/utils/django_load.py", line 56, in load
get_module(app, modname, verbose, failfast)
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/cms/utils/django_load.py", line 40, in get_module
module = import_module(module_name)
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/kalinins/.virtualenvs/blogik4/blogik4/djangocms_polls/cms_plugins.py", line 17, in <module>
plugin_pool.register_plugin(CMSPollPlugin) # register the plugin
File "/home/kalinins/.virtualenvs/blogik4/local/lib/python2.7/site-packages/cms/plugin_pool.py", line 87, in register_plugin
% (plugin, template)
ImproperlyConfigured: CMS Plugins must define a render template (<class 'djangocms_polls.cms_plugins.CMSPollPlugin'>) that exists: djangocms_polls/poll_plugin.html