Closed GoogleCodeExporter closed 9 years ago
The lang variable is supposed to be present in the context. I made some changes
so
it's not necessary in the revision 636.
Original comment by batiste....@gmail.com
on 13 Aug 2009 at 4:36
Thanks for your speedy response!
Updated to latest rev, now getting "Caught an exception while rendering:
'path'".
Traceback:
Environment:
Request Method: GET
Request URL: http://localhost:8000/gallery/photos/
Django Version: 1.1 SVN-11450
Python Version: 2.5.1
Installed Applications:
['django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.auth',
'garthfagan.quotes',
'garthfagan.utils',
'garthfagan.registrations',
'pages',
'mptt',
'photologue',
'tagging',
'django_extensions']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.locale.LocaleMiddleware')
Template error:
In template /Users/Nick/Code Dumbwaiter/garthfagan/templates/base.html, error
at line 56
Caught an exception while rendering: 'path'
46 : <div class="field"><input type="text"
name="newsletter-signup" id="newsletter-signup"></div>
47 : <div class="field disabled"><input type="submit"
name="submit" id="newsletter-submit" value="Submit"></div>
48 : </form>
49 : <a id="newsletter-signup-button" href="#"
onclick="$('#newsletter-submit').click(); return false;">Sign Up</a>
50 : </div>
51 : </div>
52 : </div>
53 : <div id="nav">
54 : {% if not is_school %}
55 : <ul class="frame group">
56 : {% for page in pages %}
57 : {% pages_menu page %}
58 : {% endfor %}
59 : </ul>
60 : {% endif %}
61 : {% if is_school %}
62 : <ul class="frame group">
63 : <li{% ifequal request.path_info '/school/' %} class="active"{%
endifequal %}><a href="/school/">Home</a></li>
64 : <li{% ifequal request.path_info '/school/about/' %}
class="active"{% endifequal %}><a href="/school/about/">About</a></li>
65 : <li{% ifequal request.path_info '/school/classes/' %}
class="active"{% endifequal %}><a href="/school/classes/">Classes</a></li>
66 : <li{% ifequal request.path_info '/school/gallery/' %}
class="active"{% endifequal %}>
Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in
get_response
92. response = callback(request, *callback_args, **callback_kwargs)
File "/Users/Nick/Code Dumbwaiter/garthfagan/../garthfagan/views.py" in photos
42. return render_to_response('photos.html', locals(),
context_instance=RequestContext(request))
File "/usr/lib/python2.5/site-packages/django/shortcuts/__init__.py" in
render_to_response
20. return HttpResponse(loader.render_to_string(*args, **kwargs),
**httpresponse_kwargs)
File "/usr/lib/python2.5/site-packages/django/template/loader.py" in
render_to_string
108. return t.render(context_instance)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render
178. return self.nodelist.render(context)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render
779. bits.append(self.render_node(node, context))
File "/usr/lib/python2.5/site-packages/django/template/debug.py" in render_node
71. result = node.render(context)
File "/usr/lib/python2.5/site-packages/django/template/loader_tags.py" in render
97. return compiled_parent.render(context)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render
178. return self.nodelist.render(context)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render
779. bits.append(self.render_node(node, context))
File "/usr/lib/python2.5/site-packages/django/template/debug.py" in render_node
71. result = node.render(context)
File "/Users/Nick/Code
Dumbwaiter/garthfagan/../garthfagan/utils/templatetags/smart_if.py" in render
298. return self.nodelist_true.render(context)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render
779. bits.append(self.render_node(node, context))
File "/usr/lib/python2.5/site-packages/django/template/debug.py" in render_node
81. raise wrapped
Exception Type: TemplateSyntaxError at /gallery/photos/
Exception Value: Caught an exception while rendering: 'path'
Original Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/template/debug.py", line 71, in
render_node
result = node.render(context)
File "/usr/lib/python2.5/site-packages/django/template/defaulttags.py", line 155,
in render
nodelist.append(node.render(context))
File "/usr/lib/python2.5/site-packages/django/template/__init__.py", line 936, in
render
dict = func(*args)
File "/Library/Python/2.5/site-packages/pages/templatetags/pages_tags.py", line 60,
in pages_menu
path = context['path']
File "/usr/lib/python2.5/site-packages/django/template/context.py", line 44, in
__getitem__
raise KeyError(key)
KeyError: 'path'
Original comment by intellin...@gmail.com
on 14 Aug 2009 at 1:16
Is this bug fixed with the last revision 640 ?
Original comment by batiste....@gmail.com
on 14 Aug 2009 at 1:28
Perfect! Thanks.
Original comment by intellin...@gmail.com
on 14 Aug 2009 at 1:42
My only critique would be this tag:
{% load_pages %}
Now returns the word "None" to the template.
Original comment by intellin...@gmail.com
on 14 Aug 2009 at 1:44
Should be done in 641
Original comment by batiste....@gmail.com
on 14 Aug 2009 at 2:58
Perfect. Thanks, again.
Original comment by intellin...@gmail.com
on 14 Aug 2009 at 4:32
Original issue reported on code.google.com by
intellin...@gmail.com
on 12 Aug 2009 at 3:23