API endpoint that allows regions to be viewed. Filter fields ------------- You can filter the result set by providing the following query parameters: * `slug` -- Filter by region slug. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) * `geom` -- Filter by the region's geography. Supports the [standard geographic lookup types](http://localwiki.net/main/API_Documentation#geo_lookups) * `settings` * `settings__default_language` -- Filter by the region's default language. Accepts one of %(allowed_languages)s. * `settings__region_center` -- Filter by the region's center geography. Supports the [standard geographic lookup types](http://localwiki.net/main/API_Documentation#geo_lookups) Ordering -------- You can order the result set by providing the `ordering` query parameter with the value of one of: * `slug` You can reverse ordering by using the `-` sign, e.g. `-slug`. """ % {'allowed_languages': allowed_languages} queryset = Region.objects.all() serializer_class = RegionSerializer filter_class = RegionFilter ordering_fields = ('slug',) router.register(u'regions', RegionViewSet)
Filter fields ------------- You can filter the result set by providing the following query parameters: * `slug` -- Filter by region slug. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) * `geom` -- Filter by the region's geography. Supports the [standard geographic lookup types](http://localwiki.net/main/API_Documentation#geo_lookups) * `settings` * `settings__default_language` -- Filter by the region's default language. Accepts one of %(allowed_languages)s. * `settings__region_center` -- Filter by the region's center geography. Supports the [standard geographic lookup types](http://localwiki.net/main/API_Documentation#geo_lookups) Ordering -------- You can order the result set by providing the `ordering` query parameter with the value of one of: * `slug` You can reverse ordering by using the `-` sign, e.g. `-slug`. """ % { 'allowed_languages': allowed_languages } queryset = Region.objects.all() serializer_class = RegionSerializer filter_class = RegionFilter ordering_fields = ('slug', ) router.register(u'regions', RegionViewSet)
And the usual set of historical filter fields: * `history_user` - filter by the `user` resource of the editor, if user was logged in. Allows for chained filtering on all of the filters available on the [user resource](../users/), e.g. `history_user__username`. * `history_user_ip` - filter by the IP address of the editor. * `history_date` - filter by history date. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) * `history_type` - filter by [history type id](../../api_docs/history_type), exact. Ordering -------- You can order the result set by providing the `ordering` query parameter with the value of one of: * `slug` * `history_date` You can reverse ordering by using the `-` sign, e.g. `-slug`. """ queryset = PageFile.versions.all() serializer_class = HistoricalFileSerializer filter_class = HistoricalFileFilter ordering_fields = ('slug', 'history_date') router.register(u'pages', PageViewSet) router.register(u'pages_history', HistoricalPageViewSet) router.register(u'files', FileViewSet) router.register(u'files_history', HistoricalFileViewSet)
""" API endpoint that allows users to be viewed. Filter fields ------------- You can filter the result set by providing the following query parameters: * `username` -- Filter by username. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) * `first_name` -- Filter by first name, exact match. * `last_name` -- Filter by last name, exact match. * `date_joined` -- Filter by date joined. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups). Ordering -------- You can order the result set by providing the `ordering` query parameter with the value of one of: * `username` * `date_joined` You can reverse ordering by using the `-` sign, e.g. `-username`. """ queryset = User.objects.all() serializer_class = UserSerializer filter_class = UserFilter ordering_fields = ('username', 'date_joined') router.register(r'users', UserViewSet)
* `polys` -- Filter by the polygons, if present. Supports the [standard geographic lookup types](http://localwiki.net/main/API_Documentation#geo_lookups) * `page` -- Filter by page. Allows for chained filtering on all of the filters available on the [page resource](../pages/), e.g. `page__slug`. * `region` -- Filter by region. Allows for chained filtering on all of the filters available on the [region resource](../regions/), e.g. `region__slug`. * `length` -- Filter by length of the geography. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) And the usual set of historical filter fields: * `history_user` - filter by the `user` resource of the editor, if user was logged in. Allows for chained filtering on all of the filters available on the [user resource](../users/), e.g. `history_user__username`. * `history_user_ip` - filter by the IP address of the editor. * `history_date` - filter by history date. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) * `history_type` - filter by [history type id](../../api_docs/history_type), exact. Ordering -------- You can order the result set by providing the `ordering` query parameter with the value of one of: * `length` * `history_date` You can reverse ordering by using the `-` sign, e.g. `-length`. """ queryset = MapData.versions.all() serializer_class = HistoricalMapDataSerializer filter_class = HistoricalMapFilter ordering_fields = ('length', 'history_date') router.register(u'maps', MapDataViewSet) router.register(u'maps_history', HistoricalMapDataViewSet)
* `source` -- Filter by source slug. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) * `destination` -- Filter by destination page. Allows for chained filtering on all of the filters available on the [page resource](../pages/), e.g. `destination__slug`. * `region` -- Filter by region. Allows for chained filtering on all of the filters available on the [region resource](../regions/), e.g. `region__slug`. And the usual set of historical filter fields: * `history_user` - filter by the `user` resource of the editor, if user was logged in. Allows for chained filtering on all of the filters available on the [user resource](../users/), e.g. `history_user__username`. * `history_user_ip` - filter by the IP address of the editor. * `history_date` - filter by history date. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) * `history_type` - filter by [history type id](../../api_docs/history_type), exact. Ordering -------- You can order the result set by providing the `ordering` query parameter with the value of one of: * `source` * `history_date` You can reverse ordering by using the `-` sign, e.g. `-source`. """ queryset = Redirect.versions.all() serializer_class = HistoricalRedirectSerializer filter_class = HistoricalRedirectFilter ordering_fields = ('source', 'history_date') router.register(u'redirects', RedirectViewSet) router.register(u'redirects_history', HistoricalRedirectViewSet)
You can filter the result set by providing the following query parameters: * `tags` -- Filter by tag. E.g. `tags=park` for all historical tag sets containing 'park', or `tags=park,wifi` for all historical tag sets containing 'park' **and** also tagged 'wifi'. * `page` -- Filter by page. Allows for chained filtering on all of the filters available on the [page resource](../pages/), e.g. `page__slug`. * `region` -- Filter by region. Allows for chained filtering on all of the filters available on the [region resource](../regions/), e.g. `region__slug`. And the usual set of historical filter fields: * `history_user` - filter by the `user` resource of the editor, if user was logged in. Allows for chained filtering on all of the filters available on the [user resource](../users/), e.g. `history_user__username`. * `history_user_ip` - filter by the IP address of the editor. * `history_date` - filter by history date. Supports the [standard lookup types](http://localwiki.net/main/API_Documentation#lookups) * `history_type` - filter by [history type id](../../api_docs/history_type), exact. Ordering -------- You can order the result set by providing the `ordering` query parameter with the value of one of: * `history_date` You can reverse ordering by using the `-` sign, e.g. `-history_date`. """ queryset = PageTagSet.versions.all() serializer_class = HistoricalPageTagSetSerializer filter_class = HistoricalTagFilter ordering_fields = ('history_date',) router.register(u'tags_history', HistoricalTagViewSet)