On Fri, Apr 16, 2010 at 4:16 PM, Daxal <daxal.someone...@gmail.com> wrote: > Hi, > > I changed it to this. and i am pretty sure this is correct > def cvdetails(request, id): > if request.method == 'POST': > f = cvForm(request.POST) > if form.is_valid(): > return HttpResponseRedirect('cm/cvdetails.html') > else: > f = cvForm() > return render_to_response('cm/cvdetails.html', {'f':f,}) > > but now i get this error: not sure if u have gotten it before: > > *error* > > TemplateSyntaxError at /cm/21003/cv/ > > Caught an exception while rendering: 'session' > > traceback is: > > 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 "/home/cpcs/portal/stafftracker/templatetags/avail_tag.py", > line 10, in render > session=context['session'] > File "/usr/lib/python2.5/site-packages/django/template/context.py", > line 44, in __getitem__ > raise KeyError(key) > KeyError: 'session' > > and it highlights what part of template its in: > > line 16 {% get_availability %} on application.html is causing the > problem. but this application is the main page that is rendered for > every single page. so my cvdetails.html extends application.html but > it gives me this error when it does not for any other page. > > any ideas on what maybe causing this? > > thanks > >
You're not rendering with a RequestContext on this page, but you are on the others? You have a lot of current threads with roughly the same questions in them... Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.