Home  >  Q&A  >  body text

python - 怎么用django从前端获取数据,并且赋值给某个变量

现在我想通过html表单获取一个字符串,然后把这个字符串赋值给views.py里某个字符串变量,请问大神该如何操作

PHP中文网PHP中文网2741 days ago228

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-18 09:35:19

    Reference: Django Notes (7) - User interaction and forms


    Questions I answered: Python-QA

    reply
    0
  • PHPz

    PHPz2017-04-18 09:35:19

    You can send ajax in the front-end and send the front-end data to the back-end, and the back-end will process it

    reply
    0
  • Cancelreply