Ignore:
Timestamp:
18/05/09 15:32:54 (11 years ago)
Author:
cbyrom
Message:

Simplify structure of discovery controller, using the results template
to render searches even when no results are found. Add new error
dict to avoid confusing with the error dict used by the formencode
input checker. Add additional input checks and improve error handling.
Add dropdown list to select order by values + add new constants
module to store associated data and error keys + tidy up DiscoveryState?
object to make clearer and logic more consistent + fix paging controls
for results data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/lib/Utilities.py

    r4959 r5302  
    7070    """ 
    7171    return [urllib.unquote(x) for x in string.split('|')] 
     72 
     73 
     74def getURLConstraints(urlConstraints): 
     75    ''' 
     76    Given a set of contraints passed as a uri parameter, convert these into 
     77    a dict and return this, avoiding duplicate entries 
     78    @return dict with key, val = param, value 
     79    ''' 
     80    constraints = {} 
     81    inputs = urlConstraints.split('&') 
     82    for input in inputs: 
     83        data = input.split('=') 
     84        if len(data) > 2: 
     85            import pdb 
     86            pdb.set_trace() 
     87        key, val = input.split('=') 
     88        if val: 
     89            constraints[key] = val 
     90    return constraints 
     91 
Note: See TracChangeset for help on using the changeset viewer.