have python 3.9 installed - 3.10 is not going to work thanks to ancient dependencies. It is what it is.
have pip and invoke installed
run inv setup
this will fail on the db creation part because it has no local postgres available.
we don't care
create an .env file and use the staging db url as DATABASE_URL=... because you do NOT want to set up a postgres 9.6 local instance, or even try to get docker to still do that with properly exposed ports.
DO NOT RUN INV SETUP OR INV NEW-DB FROM THIS POINT ON DURING TESTING. You'll wipe the staging database. Please don't.
This PR covers the server-side recaptcha work outlined in https://github.com/mozilla/network-pulse-api/issues/762
This gates the login route behind recaptcha validation, if
USE_RECAPTCHA
is enabled.Requires https://github.com/mozilla/network-pulse/pull/1637 on the client-side.
Testing
inv setup
.env
file and use the staging db url asDATABASE_URL=...
because you do NOT want to set up a postgres 9.6 local instance, or even try to get docker to still do that with properly exposed ports.INV SETUP
ORINV NEW-DB
FROM THIS POINT ON DURING TESTING. You'll wipe the staging database. Please don't.USE_RECAPTCHA=True
to your.env
localhost (v3)
recaptcha secret from https://www.google.com/recaptcha/admin and addRECAPTCHA_SECRET=thatvalueyoujustgot
to your.env
inv runserver