Function calls don't get the request parameter

Bug #122255 reported by Graham Binns
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django_xmlrpc
Confirmed
Undecided
Unassigned

Bug Description

All view-functions on django get as a first parameter the request parameter. The django-XMLRPC breaks this behavior. If i want to read something from the session like the language used or some parameters saved in the session this is needed. We use Django-AMF and there a function call always gets the request object too. This would allow us to map the same functions to XMLRPC and AMF.

(Reported as Issue #1 at the Google Code site).

Revision history for this message
Graham Binns (gmb) wrote :

Any fix for this would represent a possible break in backwards compatibility or an awkward workaround to allow backwards compatibility to continue.

Revision history for this message
digi604 (patrick-lauber) wrote :

maybe use a second decorator for this

Revision history for this message
Graham Binns (gmb) wrote :

Changed status to incomplete - need more information before deciding what needs doing here.

Changed in django-xmlrpc:
status: New → Incomplete
Graham Binns (gmb)
Changed in django-xmlrpc:
status: Incomplete → Invalid
status: Invalid → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for django_xmlrpc because there has been no activity for 60 days.]

Revision history for this message
nubis (gnubis) wrote :

Hey, I see that there's no much advance related to this issue...
I, know it requires some design discussion in order to come up with a 'decent' alternative, but in the meantime I (as you too probably) have made my own fix.
Using it, xmlrpc methods recevie the request as first argument, and 2 new keyword arguments
django_kwargs, django_args for args captured in the url.

It has the obvious downsides:
it overrides _marshalled_dispatch wich is supposed to be private in the first place (as hinted by the leading _ ). Url caught arguments get passed with totally ad-hoc names, and it uses the old 'deprecated' way of passing a dispatch method to _marshalled_dispatch.

Also, writing urls that capture parameters for xml_rpc calls could have legitimate uses, but I can't think of any right now.

all in all, I couldn't find this and I really really needed it, and lost a considerable couple of hours in a fix that I wouldn't want anyone else to waste, so please don't be mad at me for posting this here.

thanks for your attention

Revision history for this message
Graham Binns (gmb) wrote :

Reopening this - at least for investigation.

Changed in django-xmlrpc:
status: Invalid → New
Revision history for this message
Carsten Agger (agger) wrote :

Is there any status on this bug? I'm getting "bitten" by this, as I'm using Django-XML-RPC and finding it works really fine - but now I need to extract some headers from the request, and the only way ahead seems to writing some dodgy middleware using threadlocal.

(I might end up having to patch it, but it would be nice if there were a "standard" way of doing this.)

Changed in django-xmlrpc:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.