Hi!
I've installed crowdsourcing example app using instructions from:
http://packages.python.org/django-crowdsourcing/developers/index.html#installation
However, each time I try to open
http://localhost:8000/ Django
throws an exception:
'crowdsourcing' is not a valid tag library: ImportError raised loading
crowdsourcing.templatetags.crowdsourcing: No module named
crowdsourcing.models
I use Django 1.2.4, crowdsourcing models are synchronized properly.
In Admin Panel I can add new survey. Running ./manage.py shell allows
me to import models from crowdsourcing. The problem is only with
crowdsourcing templatetags.
Full traceback:
Environment:
Request Method: GET
Request URL:
http://localhost:8000/
Django Version: 1.2.4
Python Version: 2.7.0
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'crowdsourcing',
'cms']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Template error:
In template /home/ext/virtualenvs/crowd/src/crowdsourcing/example_app/
templates/home.html, error at line 1
'crowdsourcing' is not a valid tag library: ImportError raised
loading crowdsourcing.templatetags.crowdsourcing: No module named
crowdsourcing.models
1 : {% load crowdsourcing %}
2 : <html>
3 : <head>
4 : <title>Example App Home</title>
5 : {% include "header_tags.html" %}
6 : </head>
7 : <body>
8 :
9 : <p>This page demostrates how to embed surveys and survey
reports anywhere on
10 : your site. To see it in action, set a survey up and make it
public.</p>
11 : {% if latest_survey %}
Traceback:
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
core/handlers/base.py" in get_response
100. response = callback(request,
*callback_args, **callback_kwargs)
File "/home/ext/virtualenvs/django-crowdsourcing/example_app/cms/
views.py" in home
14. RequestContext(request))
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
shortcuts/__init__.py" in render_to_response
20. return HttpResponse(loader.render_to_string(*args,
**kwargs), **httpresponse_kwargs)
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
template/loader.py" in render_to_string
181. t = get_template(template_name)
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
template/loader.py" in get_template
160. template = get_template_from_string(template, origin,
template_name)
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
template/loader.py" in get_template_from_string
168. return Template(source, origin, name)
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
template/__init__.py" in __init__
158. self.nodelist = compile_string(template_string, origin)
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
template/__init__.py" in compile_string
186. return parser.parse()
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
template/__init__.py" in parse
282. compiled_result = compile_func(self, token)
File "/home/ext/virtualenvs/crowd/lib/python2.7/site-packages/django/
template/defaulttags.py" in load
928. (taglib, e))
Exception Type: TemplateSyntaxError at /
Exception Value: 'crowdsourcing' is not a valid tag library:
ImportError raised loading crowdsourcing.templatetags.crowdsourcing:
No module named crowdsourcing.models