RE: noob: Where does print output go?

2008-08-22 Thread Emily Rodgers

You could use the python logging module
(http://docs.python.org/lib/module-logging.html) and do
logging.debug(list(product_list)). Then it will appear in your web logs.

> -Original Message-
> From: django-users@googlegroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> Sent: 22 August 2008 09:26
> To: Django users
> Subject: noob: Where does print output go?
> 
> 
> Hi All,
> 
> Can anybody tell me if there's a possibility to see output of 
> the regular print command when used in a view? fo instance to 
> a log file with a "tail -f"
> 
> The code:
> 
> def detail(request, id):
> p = get_object_or_404(Customer, pk=customer_id)
> product_list = p.product_set.all()
> print product_list
> 
> It's not going to stay there, but with commands like dir() 
> and help() I can get a lot of usefull info on the objects I'm 
> working (playing .. ;-) with.
> 
> Thanx a lot!
> 
> Regards,
> 
> Gerard.
> 
> > 
> 

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



Re: noob: Where does print output go?

2008-08-22 Thread Gerard

Emily,

Great idea, thanx!

Regards,

Gerard.

Emily Rodgers wrote:
> You could use the python logging module
> (http://docs.python.org/lib/module-logging.html) and do
> logging.debug(list(product_list)). Then it will appear in your web logs.
> 
>> -Original Message-
>> From: django-users@googlegroups.com 
>> [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
>> Sent: 22 August 2008 09:26
>> To: Django users
>> Subject: noob: Where does print output go?
>>
>>
>> Hi All,
>>
>> Can anybody tell me if there's a possibility to see output of 
>> the regular print command when used in a view? fo instance to 
>> a log file with a "tail -f"
>>
>> The code:
>>
>> def detail(request, id):
>> p = get_object_or_404(Customer, pk=customer_id)
>> product_list = p.product_set.all()
>> print product_list
>>
>> It's not going to stay there, but with commands like dir() 
>> and help() I can get a lot of usefull info on the objects I'm 
>> working (playing .. ;-) with.
>>
>> Thanx a lot!
>>
>> Regards,
>>
>> Gerard.
>>
> 
> > 

-- 
urls = { 'fun':  'www.zonderbroodje.nl',  'tech':  'www.gp-net.nl' }


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



Re: noob: Where does print output go?

2008-08-22 Thread Frantisek Malina

When using the development server,
print output is right in the terminal.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: noob: Where does print output go?

2008-08-22 Thread lingrlongr

Take a look at django-logging.  
http://code.google.com/p/django-logging/wiki/Overview

On Aug 22, 4:26 am, [EMAIL PROTECTED] wrote:
> Hi All,
>
> Can anybody tell me if there's a possibility to see output of the
> regular print command when used in a view? fo instance to a log file
> with a "tail -f"
>
> The code:
>
> def detail(request, id):
>     p = get_object_or_404(Customer, pk=customer_id)
>     product_list = p.product_set.all()
>     print product_list
>
> It's not going to stay there, but with commands like dir() and help()
> I can get a lot of usefull info on the objects I'm working
> (playing .. ;-) with.
>
> Thanx a lot!
>
> Regards,
>
> Gerard.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: noob: Where does print output go?

2008-08-22 Thread Gerard Petersen

Frantisek,

It was, I just couldn't get it there because the print statement was in a view 
that was never invoked .. :-/

Thanx a lot.

Regards,

Gerard.

Frantisek Malina wrote:
> When using the development server,
> print output is right in the terminal.
> > 

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