Ignore:
Timestamp:
14/12/09 12:39:46 (11 years ago)
Author:
astephen
Message:

more fixes and improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/controllers/submit.py

    r5968 r6116  
    11import logging 
     2import urllib2 
    23 
    34from pylons import request, response, session, tmpl_context as c 
     
    1819        """ 
    1920        args = {} 
    20         for (key, value) in request.params.items(): 
    21             args[str(key)] = str(value)  
     21        for key in request.params.keys(): 
     22            # Ignore items prefixed with underscore 
     23            if str(key)[0] == "_": continue 
     24 
     25            # Use getall for all args and pipe join them if more than one 
     26            values = request.params.getall(key) 
     27            if values[0] == "-- Please select --": 
     28                del values[0] 
     29 
     30            # Remove if no values provided 
     31            if len(values) == 0: continue 
     32 
     33            value = "|".join([str(i) for i in values]) 
     34            args[str(key)] = urllib2.quote(value) 
    2235 
    2336        if not args.has_key("proc_id"): 
Note: See TracChangeset for help on using the changeset viewer.