signature for request is render(request, template_name, context, **kwargs)

So it should be like render(request, 'response_page.html', context=context)

On Sat, 24 Oct 2015 at 01:21 CTA2052 <[email protected]> wrote:

> Hello All,
>
> This may be the most basic question to ask and believe me it does not come
> without much research and frustration, but I just can't seem to make it
> work. So I do apologize ahead of time for even having to post it. I am very
> new to django (2-months), python(4-months) and in fact programming in
> general. I have reviewed the online doc sevral times now and various books
> and tutorials trying to find the answer.
>
> However, I can't seem to get my template variables to render within the
> web page (crazy I know).
>
> I've tried this many different ways and finally backed-up and
> stripped-down the code to see what it is I'm missing
>
> *Here is what I have right now in the veiw:*
>
> def response_page(request):
>
>     myv = " fun fun fun "
>     context = {'affirmation': myv}
>     return render('/response_page/', context )
>
>
> *Here is the template:*
>
>
> <!DOCTYPE html>
>
> {% extends "base.html" %}
> {% load static %}
> {% load crispy_forms_tags %}
>
> <html lang="en">
> <head>
>     <meta charset="UTF-8">
>     <title>challenge_engine_response</title>
> </head>
> <body>
> {% block content %}
> <h1>Testing 1,2,3</h1>
>
>
> <p> I am having so much {{ affirmation }}   </p>
>
>         <a href="/home/">Back to Home Page</a>
>
> </body>
> {% endblock %}
> </html>
>
>
> Everything shows up as expected except the variable "affirmation"  which
> of course should render as "fun fun fun".
>
> I am sure I am missing something silly, but what?
> Thanks in advance for the help.  I have very little hair left at this
> point (ha).
>
> Thank you all!
>
> Humbly yours,
> CTA2052
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5f78b5c5-0652-479f-9ffc-8cd2604967b8%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5f78b5c5-0652-479f-9ffc-8cd2604967b8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAByqUgjzhF-36x11T%3DZocVhsRcE71N_nd6grtTRZAMkdq5KRsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to