I have written a wrapper around the object_list generic view. I would
like to do some pre-processing before sending the information to the
view.

Here is my wrapper...

##########################
from django.views.generic.list_detail import object_list

def change_status(*args, **kwargs):

    print args

    # code happens

    return object_list(*args,**kwargs)
##########################

I did a dump of the args to the console (as seen above) and got this...

##########################
<DjangoRequest
GET:<MultiValueDict: {}>,
POST:<MultiValueDict: {'tail_number': [''], 'phase_type': [''],
'object_type': ['on'], 'status_type': ['']}>,
COOKIES:{'sessionid': 'f9fa0106252f77a7583dfbe24148c08f'},
META:{'ALLUSERSPROFILE': 'C:\\Documents and Settings\\All Users',
 'APPDATA': 'C:\\Documents and Settings\\Paul\\Application Data',
 'CLASSPATH': 'C:\\Program
Files\\Java\\jre1.5.0_06\\lib\\ext\\QTJava.zip',
 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files',
 'COMPUTERNAME': 'Archie',

 # removed for brevity ...

 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}>
##########################

How do I get access to the POST values without having to resort to
changing the signature of my view? I can see them in the dump but for
the life of me I can't figure out how to get at them.

Am I going about this backwards?

Should I change the view signature to
def change_status(request):
and then build the args? I so, how would I build the args? Something
like this?

return
object_list(request.GET,request.POST,request.COOKIES,request.META,**kwargs)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to