2007/8/31, Benjamin Slavin <[EMAIL PROTECTED]>: > > On 8/31/07, David Larlet <[EMAIL PROTECTED]> wrote: > > > request.method = request.REQUEST[_MIDDLEWARE_KEY].upper() > > > AttributeError: can't set attribute > > > > > Hello David,
Hi Ben, > > I don't have a mod_python install I can easily test on, but could you > try this for me: Sure, thanks for your help! > > request._req.method = request.REQUEST[_MIDDLEWARE_KEY].upper() > > I don't know if the _req.method attribute is read-only as well... so > it might not work. Unfortunately you're right: AttributeError: attribute 'method' of 'mp_request' objects is not writable > > If that doesn't work, you can use: > request.META['REQUEST_METHOD'] = request.REQUEST[_MIDDLEWARE_KEY].upper() > This one looks to be good, in fact I can't test it completely because I use the restapi GSoC and there is another method attribution in it but the initial error didn't happened anymore. > > Let me know which one works and I can try to come up with a > 'works-everywhere' solution and update the snippet. > Ok, thank you for your suggestions. David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---