samedi 27 février 2021

Write to file using Django?

I'm trying to do what I thought was straightforward but am discovering is not. I'm hosting a webserver locally on a Raspberry Pi using Django and I want to allow the user to browse to the server, type something in a text box and then have that appended to a file sitting on the Pi.

So far, I have Django displaying a really basic HTML page, but I can't get it to execute any of the functions in my views file and I also don't know if the easiest route here is to work with a POST request and have some function set up to listen and write the contents of that?




Aucun commentaire:

Enregistrer un commentaire