Thanks for the reply, actually the response object got using RequestFactory
is different from the one returned by client.get() function,,

i think response object returned by client.get() supports response.template
and response.context['data'],,,

ref:( http://djangosnippets.org/snippets/963/ )






On Wed, Sep 22, 2010 at 4:24 PM, bruno desthuilliers <
bruno.desthuilli...@gmail.com> wrote:

> On 22 sep, 11:31, girish shabadimath <girishmss.1...@gmail.com> wrote:
> > hi all,
> >
> > i used django snippethttp://djangosnippets.org/snippets/963/
> >
> > and successfully created request object
> >
> > i checked the response.status_code its giving 200
> >
> > i checked response.content it matches with the browser source code
> >
> > when i issue *response.template* it gives error
> >  and* response.context* also not giving output,,
> >
> > i used template and context data in view function,,
> >
> > why its showing nothing..?
>
> because, while the template and context are used to build the response
> object, they are not part of it.  render_to_response(templatename,
> context, ...) is just a convenient shortcut that loads the template,
> render it with the context, and build an HttpResponse using the
> generated content.
>
> FWIW, Django is not only mostly well documented but also OSS, so you
> can read the code to see what's going on:
>
>
> http://code.djangoproject.com/browser/django/trunk/django/shortcuts/__init__.py
>
> http://code.djangoproject.com/browser/django/trunk/django/http/__init__.py#L302
>
> As you can see, the HttpResponse object is built from some content -
> how this content is generated is totally orthogonal.
>
> --
> 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<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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.

Reply via email to