On Jan 17, 2008 2:32 AM, laspal <[EMAIL PROTECTED]> wrote:

>
> Hi,
> I wanted to know how can I load template without adding any
> functionality to it.
> Basically I just wanted to see how does my template looks.
>
> MY view.py is :
> from django.template.loader import get_template
> from django.template import Context
>
>
> def Main_Page(request):
>    t = get_template('MainPage.html')
>    html = t.render(Context({????}))
>   ???????????
>    ???????????


    html = t.render(Context({}))
    return HttpResponse(html)

That will render the template with an empty context and return the result.
This will only work  if your template in fact does not need any context
variables to render properly.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to