Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Replace gsheet with django models #33

Open
jbothma opened this issue Apr 13, 2022 · 0 comments
Open

Replace gsheet with django models #33

jbothma opened this issue Apr 13, 2022 · 0 comments

Comments

@jbothma
Copy link
Contributor

jbothma commented Apr 13, 2022

Nearby is used to fetch the local government representative for a given location, look up contact details, and respond with JSON or HTML depending on the request.

It is used to allow members of the public to find their local government representatives and find contact details if available, which can then be used to contact them.

We would like to replace the Google Sheets document as the data backend with Django models, Django Admin, and django-import-export.

More specifically, the scope is

  • There's a django model for ward councillor contact detail objects - one per ward
  • There's a django model for contact detail suggestions
  • django admin is enabled to manually edit these objects
  • django-import-export to support bulk import and export of contact detail objects
  • django-import-export enabling export only of suggestion objects
  • update data correction "suggest" view to use suggestions models instead of gsheet
  • update councillor lookup view to use the contact detail model
  • remove gsheet dependency
  • include automated tests, mocking the external councillor lookup API

We usually run our backend project using docker-compose for local development, and on dokku (similar to heroku) in production.

See the CI smoke test for instructions on setting up a local environment in 3 commands: (link removed)

There are currently no python tests - only a wget-based smoke test.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant