Closed digitalWestie closed 5 years ago
The Postcode table has been updated to add a column with place names.
/api/places/?q=Abe
Basic view returning a dictionary of place_names
and postcode
.
Filtering the data set but not with proper url format?
Updated the API view for post-code locations to take a query q
and filter results which start with that.
Need to now query the api for the place_name
and postcode
rather than using the hard coated data.
The api is now successfully returning the place_name and postcode data for the Easy-Autocomplete feature.
https://drive.google.com/file/d/1bNRMY_1_Z83SyuRm2TldfQSrKVIyYfLj/view?usp=sharing
To do list:
Don't worry about API exposure for now, we can deal with it later, as team are making noises about this.
Don't worry about API exposure for now, we can deal with it later, as team are making noises about this.
I've also been trying to write a test although currently, I'm not getting responses as I would expect. When manually testing the locations are returned as per the google drive link above.
As this is a priority I'll send the PR and we can discuss tests and API exposure when it's convenient.
Merged into master.
A new endpoint at
api/v4/postcodes
. Should take form of a view living inaliss/api/v4_views.py
.Relevant docs:
Any requests should provide a
q
param, which are used to to filter results (istartswith
is prob best for this).