weixin_33730836 2015-09-22 16:18 采纳率: 0%
浏览 5

Ajax-Django:发送信号

In my website, I have a button for join a team.

I try to have this processus :

  1. Click on this button.
  2. Ajax send a signal to current template view.
  3. This view recepts the signal and creates a instance of model Join.

I don't want ajax send arguments via $.POST but just a signal !

I think the solution is :

$.POST("theurl/",{"signal-join":"signal"});

if request.POST["signal-join"] :
    create instance of join

But it's not proper, what is the best away ?

  • 写回答

0条回答 默认 最新

    报告相同问题?