Hello there,
http://pylonshq.com/docs/en/0.9.7/thirdparty/webob/#webob.Response.content_type
says:
content_type:
Get/set the Content-Type header (or None), without the charset or
any parameters.
If you include parameters (or ; at all) when setting the
content_type, any existing parameters will be deleted; otherwise they
will be preserved.
so probably it's wise not to hack the dictionary but use the getters
and setters instead.
you can import reponse in your TG app just as you can import request.
then you can use response.content_type as a getter / setter.
Hope this helps,
Tom
On Tue, Sep 15, 2009 at 11:37 PM, Min <[email protected]> wrote:
>
> Response doesn't seem to support item assignment, either...
>
> On Sep 11, 11:26 am, "Diez B. Roggisch" <[email protected]> wrote:
>> On Friday 11 September 2009 17:03:32 Min wrote:
>>
>> > The problem is that request doesn't support item assignment. I recall
>> > running into this problem before. Maybe in a previous version of TG2
>> > it did, but as it stands now, you can't just assign a mime type in the
>> > request as if it were a dictionary.
>>
>> It's supposed to be response, not request. That was a mistake on my side.
>>
>> Diez
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---