Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. JavasScript:
  2. jQuery(document).ready(function(){
  3. jQuery('#ajax_form').submit(function(){
  4. var dados = jQuery( this ).serialize();
  5. $( "#infowind" ).load("writestation/", { csrfmiddlewaretoken: ck,
  6. data: data,
  7. });
  8. return false;
  9. });
  10. });
  11.  
  12. Django side (views.py):
  13. def writestation(request):
  14. if request.method == 'POST':
  15. form = request.POST.get('dados')
  16.  
  17. >> print(form)
  18. >> id=&name=someName&email=someEmail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement