Re: print_r() in Django & SQL debug output

2009-05-02 Thread Dan Mallinger
Hi Okto, I feel confident saying that Malcolm knows the ins and outs of Django far better than I do :) But, for what it's worth, I really like the logging package here: http://code.google.com/p/django-logging/wiki/Overview It's super easy and reasonably powerful. And if you install Sphinx, it'll

Re: print_r() in Django & SQL debug output

2009-05-02 Thread Malcolm Tredinnick
On Sun, 2009-05-03 at 09:48 +0700, Okto Silaban wrote: > On Sun, May 3, 2009 at 9:27 AM, Malcolm Tredinnick > 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 Re

Re: print_r() in Django & SQL debug output

2009-05-02 Thread Okto Silaban
On Sun, May 3, 2009 at 9:27 AM, Malcolm Tredinnick 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

Re: print_r() in Django & SQL debug output

2009-05-02 Thread Malcolm Tredinnick
On Sun, 2009-05-03 at 07:47 +0700, Okto Silaban wrote: > > > On Sun, May 3, 2009 at 7:04 AM, George Song wrote: > > > Django has extensive documentation. It's advisable that you > look it up > first before asking: > > >

Re: print_r() in Django & SQL debug output

2009-05-02 Thread Okto Silaban
On Sun, May 3, 2009 at 7:04 AM, George Song wrote: Django has extensive documentation. It's advisable that you look it up > first before asking: > > < > http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-debug > > Default : DEBUG = True TEMPLATE_DEBUG = DEBUG

Re: print_r() in Django & SQL debug output

2009-05-02 Thread George Song
On 5/2/2009 4:53 PM, Okto Silaban wrote: > Ok, I know this is not a PHP mailing list.. I just want to make the > question simpler. > > I'm coming from CakePHP background. > > 1. What Django template tags can I use to replace print_r() / var_dump() > in PHP? > 2. How can I display SQL debug out

print_r() in Django & SQL debug output

2009-05-02 Thread Okto Silaban
Ok, I know this is not a PHP mailing list.. I just want to make the question simpler. I'm coming from CakePHP background. 1. What Django template tags can I use to replace print_r() / var_dump() in PHP? 2. How can I display SQL debug output? *in cakePHP I can use debug() function to show the SQL