jquery

Ajax form not sending data in django

Ajax form not sending data in django Question: I am trying to send data to Django without page refresh. So I am using ajax. Created a Django model and form class MyModel(models.Model): text=models.CharField(max_length=100) class MyForm(forms.ModelForm): class Meta: model=MyModel fields = "__all__" Then send the form to the HTML page via views.py def home(request): print(request.POST.get(‘text’,False)) form …

Total answers: 1

Python Flask collapsible/expandable dynamic table

Python Flask collapsible/expandable dynamic table Question: I am building a table in flask with rows that are collapsible. A row may have several elements underneath it that will all collapse on clicking. It works fine if I just hardcode values but when I am populating the table using a loop with data from a python …

Total answers: 1

NoReverseMatch at /product/pussyes/ Reverse for 'basket_adding' not found. 'basket_adding' is not a valid view function or pattern name

NoReverseMatch at /product/pussyes/ Reverse for 'basket_adding' not found. 'basket_adding' is not a valid view function or pattern name Question: NoReverseMatch at /product/pussyes/ Reverse for ‘basket_adding’ not found. ‘basket_adding’ is not a valid view function or pattern name. Request Method: GET Request URL: http://127.0.0.1:8000/product/pussyes/ Django Version: 1.11 Exception Type: NoReverseMatch Exception Value: Reverse for ‘basket_adding’ not …

Total answers: 2

Flask Dynamic data update without reload page

Flask Dynamic data update without reload page Question: i’m trying to create something like Google Suggest Tool (via suggest api http://suggestqueries.google.com/complete/search?output=toolbar&hl=ru&q=query ) I’m listening input changes, and send data go GET: $(“#search_form_input”).keyup(function(){ var some_var = $(this).val(); $.ajax({ url: “”, type: “get”, //send it through get method data:{jsdata: some_var}, success: function(response) { }, error: function(xhr) { …

Total answers: 1

Render Jinja after jQuery AJAX request to Flask

Render Jinja after jQuery AJAX request to Flask Question: I have a web application that gets dynamic data from Flask when a select element from HTML is changed. of course that is done via jquery ajax. No probs here I got that. The problem is, the dynamic data – that is sent by Flask –, …

Total answers: 2

Incorporating Python Script with Input and Output into a JavaScript Website

Incorporating Python Script with Input and Output into a JavaScript Website Question: I’m adding extra functionality to an existing JS website, and Python works best to do the math that the program needs to do. What I need is for a user to submit information, which should then become input for my Python code, which …

Total answers: 1

how to get data from 'ImmutableMultiDict' in flask

how to get data from 'ImmutableMultiDict' in flask Question: I am learning how to use ajax and Flask ,so what I do is I send a ajax request and I receive the data as post request in my python file My html file contains this code var data = {“name”:”John Doe”,”age”:”21″}; $.ajax({ url:’/post/data’, datatype : …

Total answers: 5

Django: Loading another template on click of a button

Django: Loading another template on click of a button Question: I’ve been working on a django project for a few weeks now, just playing around so that I can get the hang of it. I am a little bit confused. I have a template now called “home.html”. I was wondering if there is anyway for …

Total answers: 3