akvo.rsr.filters module
Akvo RSR is covered by the GNU Affero General Public License. See more details in the license.txt file located at the root folder of the Akvo RSR module. For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
- akvo.rsr.filters.filter_m49(queryset, value)[source]
Filters countries from the m49 list, for projects.
- akvo.rsr.filters.filter_m49_orgs(queryset, value)[source]
Filters countries from the m49 list, for projects.
- akvo.rsr.filters.filter_title_or_subtitle(queryset, value)[source]
Filters projects based on whether title or subtitle contains value.
- akvo.rsr.filters.get_country_ids(qs)[source]
Return country ids for locations associated with the queryset items.
- akvo.rsr.filters.get_id_for_iso(i)[source]
From an iso_code e.g. ‘SE’ get the identifier.
NOTE: If i is already an id, the parent id of the given id is returned!
- akvo.rsr.filters.get_location_country_ids(qs)[source]
Return countries for locations associated with objects in the queryset.
- akvo.rsr.filters.get_location_hierarchy(location, locations=None)[source]
Return the location > parent > … > continent hierarchy for a location.
- akvo.rsr.filters.get_m49_filter(value, use_recipient_country=True)[source]
Returns the location filter object based on value.
- akvo.rsr.filters.get_recipient_country_ids(projects)[source]
Return countries based on recipient country of projects.