You get the template but you don't render it.
2011/1/14 Fletcher Haynes <[email protected]>
> Hi everyone,
>
> I'm trying to work on a project in Django, but I'm encountering some odd
> behavior. I have this in base.html in my template directory:
>
> <html>
> <head>
> <link rel="stylesheet" href="{{ STATIC_URL }}style.css" />
> <title>{% block title %}Schedule{% endblock %}</title>
> </head>
> <body>
> <div id="logobar">
> {% block logobar %}
> Logo bar will go here
> {% endblock %}
> </div>
> <div id="menubar">
> {% block menubar %}
> Menu will go here
> {% endblock %}
> </div>
> <div id="content">
> {% block content %}{% endblock %}
> </div>
> </body>
> </html>
>
> And my test view is this:
>
> def test(request):
> t = loader.get_template('base.html')
> return HttpResponse(t)
>
> and this is what results on a webpage:
>
> '> ]> '>]> '>]> '>
>
> with the view source of the page looking like this:
>
> <Text Node: '<html> <head> '><Variable Node: STATIC_URL><Text Node:
> 'style.css" /> <t'><Block Node: title. Contents: [<Text Node: 'Help Desk
> Schedule'>]><Text Node: '</title> </head> '><Block Node: logobar.
> Contents: [<Text Node: ' Logo bar wi'>]><Text Node: ' </div> '><Block
> Node: menubar. Contents: [<Text Node: ' Menu will g'>]><Text Node: ' </div>
> '><Block Node: content. Contents: []><Text Node: ' </div> </b'>
>
> I'm really confused at this point...I would appreciate any help.
>
> Thanks!
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<django-users%[email protected]>
> .
> For more options, visit this group at
> http://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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.