Re: Dynamic images

2008-09-17 Thread Kenneth Gonsalves
On Wednesday 17 Sep 2008 5:01:45 pm TKa wrote: > Because I need input from the Django models for the image I want to > call the drawing function from the view. I guess I could save the > image file to temporary folder and then link the image tag to that > file in Response but is there any better w

Re: Dynamic images

2008-09-17 Thread TKa
Thank you for both of you for the fast reply. I'm still a Django newbie and I didn't know that the HttpResponse has these features. I suppose I need to study the HttpResponse documentation more carefully now. I will just need the basic web-formats so I think I will get things work with these advic

Re: Dynamic images

2008-09-17 Thread Daniel Roseman
On Sep 17, 12:31 pm, TKa <[EMAIL PROTECTED]> wrote: > Can anybody help me how to create dynamic images within Django? > Drawing the image with Python is not a problem but how to link the > created image to the httpResponse? > > Because I need input from the Django models for the image I want to >

Re: Dynamic images

2008-09-17 Thread Fredrik Lundh
Jarek Zgoda wrote: > You can just return the content (bytes) in HttpResponse with > appropriate content-type header. First argument to HttpResponse > constructor is the content. if you're using PIL to create the image, you can (usually) save the image to the response object, e.g. resp

Re: Dynamic images

2008-09-17 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-09-17, o godz. 13:31, przez TKa: > Can anybody help me how to create dynamic images within Django? > Drawing the image with Python is not a problem but how to link the > created image to the httpResponse? > > Because I need input from the Django models for the image