Hi, None of my other views have RequestContext in them and they are passing in the same variables. I am one of those programmers that come in succession trying to figure out what the previous one was trying to do. and this guy didn't even put any comments on it. so it takes me a longg time to try to understand whats going on.
sorry if my questions sound really dumb. in regards to the same question, I am very sorry about that. I was not getting any replies (probably my impatience) ... won't happen again. sorry. right now i am trying to figure this thing out using two approaches (one is using modelform and second is just putting fields in the form - the more traditional approach) thank you for your help p.s. any other suggestions? i am searching on web really clueless as to what's happening. On Apr 16, 11:21 am, Tom Evans <tevans...@googlemail.com> wrote: > 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 > athttp://groups.google.com/group/django-users?hl=en. -- 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.