Skip to content

Instantly share code, notes, and snippets.

@benspaulding
Created July 5, 2010 15:56
Show Gist options
  • Save benspaulding/464489 to your computer and use it in GitHub Desktop.
Save benspaulding/464489 to your computer and use it in GitHub Desktop.
Environment:
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.1.3 pre-alpha
Python Version: 2.6.1
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Template error:
In template /Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/logic_site/templates/homepage.html, error at line 19
'foobar' is not a valid tag library: Could not load template library from django.templatetags.foobar, No module named foobar
9 : actually evaluated. The code below throws an error when the either of the
10 : <code>load</code> or <code>firstof</code> statements is uncommented.
11 :
12 : <dl>
13 : <dt>Foobar
14 : <dd>{{ foobar|yesno }}
15 : </dl>
16 :
17 : <p>
18 : {% if foobar %}
19 : {% load foobar %}
20 : {# {% firstof %} #}
21 : We have <code>foobar</code>!
22 : {% else %}
23 : There is no <code>foobar</code>.
24 : {% endif %}
25 :
Traceback:
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
99. response = callback(request, *callback_args, **callback_kwargs)
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/views/generic/simple.py" in direct_to_template
17. t = loader.get_template(template)
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/template/loader.py" in get_template
82. template = get_template_from_string(source, origin, template_name)
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/template/loader.py" in get_template_from_string
90. return Template(source, origin, name)
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/template/__init__.py" in __init__
155. self.nodelist = compile_string(template_string, origin)
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/template/__init__.py" in compile_string
176. return parser.parse()
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/template/__init__.py" in parse
272. compiled_result = compile_func(self, token)
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/template/defaulttags.py" in do_if
830. nodelist_true = parser.parse(('else', 'endif'))
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/template/__init__.py" in parse
272. compiled_result = compile_func(self, token)
File "/Users/benspaulding/dev/env/logic_test/lib/python2.6/site-packages/django/template/defaulttags.py" in load
929. (taglib, e))
Exception Type: TemplateSyntaxError at /
Exception Value: 'foobar' is not a valid tag library: Could not load template library from django.templatetags.foobar, No module named foobar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment