On Sun, 2009-05-03 at 09:48 +0700, Okto Silaban wrote: > On Sun, May 3, 2009 at 9:27 AM, Malcolm Tredinnick > <malc...@pointy-stick.com> wrote: > > > > How are you rendering that template? The only thing I can > think of that > will go wrong here is if you do not pass a RequestContext to > render_to_response() -- or whatever rendering method you are > using. > Context processors only run if the context is a > RequestContext, not > simply a Context object. > > See this documentation (esp. the "note" callout): > http://docs.djangoproject.com/en/dev/ref/templates/api/#id1 > > Thanx.. You're right, I forgot to add this as the third parameter : > context_instance=RequestContext(request) > > And, how about my first question ? > > 1. What Django template tags can I use to replace print_r() / > var_dump() in PHP?
There are no direct equivalents, because Django templates are at a different level and provide different functionality to PHP files. However, there are a few things you can do for viewing the context and seeing things in "pretty printed" format. Here are a bunch of ideas I wrote up recently: http://www.pointy-stick.com/blog/2009/02/03/some-simple-django-debugging-tools/ Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---