i love you
haha
many thanks to all the Django programmers who have given us such an
awesome platform.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dja
On Mon, Jun 30, 2008 at 3:27 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote:
>
> in my view I have:
>
>
> from django.template import RequestContext
> from django.template import Template, Context
>
> [... session variables set here...]
>
> return render_to_response('step3.html',
> context_instance=R
> If you have activated the request context processor, the request is
> *automatically* passed to the template. (That was the point of all
> this, right?)
>
> So to display the value of request.session['City'], for example, you'd
> use this in your template:
>
> {{ request.session.City }}
>
> A
On Mon, Jun 30, 2008 at 8:12 AM, Bobby Roberts <[EMAIL PROTECTED]> wrote:
>
> ok i'm totally lost i guess...
>
> in my view i setup my session variables as such...
>
>request.session['Street2']=request.POST.get('Street2','')
>request.session['City']=request.POST.get('City',
ok i'm totally lost i guess...
in my view i setup my session variables as such...
request.session['Street2']=request.POST.get('Street2','')
request.session['City']=request.POST.get('City','')
request.session['State']=request.POST.get('State','')
r
On Sun, Jun 29, 2008 at 9:08 AM, Bobby Roberts <[EMAIL PROTECTED]> wrote:
>
> So I have to explicitly pass the session variables to the template to
> use them? That kind of defeats the purpose of session variables
> doesn't it? If they are in session we should be able to access them
> easier tha
So I have to explicitly pass the session variables to the template to
use them? That kind of defeats the purpose of session variables
doesn't it? If they are in session we should be able to access them
easier than passing them from view to template throughout our
application.
--~--~-~-
On Jun 27, 9:33 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote:
> i'm trying to view session variables on the screen in a template. I
> know the session variable has a value because i've tested it in my
> view. I'm trying this in my template but not getting any results:
>
> Account #: {{ request.se
Hi Bobby,
Typically what I do is set the value from the session into a variable
that I pass into the context.
#in views.py
def my_action(request)
account_num = request.session['AccountNum']
return render_to_response('the_template.html', {'account_num' :
account_num})
#in the_template.ht
i'm trying to view session variables on the screen in a template. I
know the session variable has a value because i've tested it in my
view. I'm trying this in my template but not getting any results:
Account #: {{ request.session.AccountNum }}
What could I be doing wrong?
--~--~-~--~-
10 matches
Mail list logo