0

how can i get a local event (example: a physical button pressed) to trigger events on a remote django website.

without using a keyboard or mouse click.

2 Answers 2

1

@lenik is right.

Another way is just use Python: write a Python script (or even better, a Django project) to send a HTTP request (I would use JSON or REST API) to the Django remote application. Sounds too much work, and it is if the purpose is just for fun. But it's way more elegant.

0

you're trying to do things the other way around.

the correct way would be to write a python script to use GPIO library to access the current state of your pins and then if something interesting happens, use urllib to access the remote URL, thus telling your web server about the remote events.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.