Hi I have a doctest which says:
""" >>> from django.test.client import Client >>> c.login(username='testuser', password='testpw') True Now we go to the sample page >>> response = c.get('/app/sample_page/') >>> response.status_code 200 So far so good but... >>> response.template >>> response.template.name <type 'exceptions.AttributeError'> Traceback (most recent call last) /home/ext/workingenvs/django2.5/src/projects/oms_dystrybutor/<ipython console> in <module>() <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'name' >>> print response.template None The same for context: >> response.context >> print response.context None """ My app/sample_page view which is called above ends with: return render_to_response('app/sample_page.html', {'form': form.as_table(), 'opts': User._meta, 'message':message, 'glob_err_message':error_message}, context_instance=RequestContext(request)) So here is a template and a context. Why I can't access it in my doctest via response.template and response.context? regards -- Jakub Wiśniowski --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---