[ckan-dev] lib.helpers.unselected_facet_items() proposed change

Sean Hammond sean.hammond at okfn.org
Fri May 25 11:27:33 UTC 2012


> Ckan demo needs to show all the facets, selected and unselected
> 
> I have created a new helper function
> get_facet_items_dict(facet, limit=10, exclude_active=False)
> 
> It basically does the same thing as unselected_facet_items() except that it
> also adds 'active' : True/False to the dicts in the list
> I'd like to make unselected_facet_items()just call it (..
> exclude_active=True) to avoid code duplication.
> 
> To me this seems to be an acceptable change to make anyone want to say I'm
> crazy?

This sounds fine to me, as long as unselected_facets() remains
backwards-compatible it won't break existing templates that are using
it.




More information about the ckan-dev mailing list