Questions tagged [django-ajax-selects]

django-ajax-selects is a module for Django which enables editing of ForeignKey, ManyToMany and CharField using jQuery UI Autocomplete.

django-ajax-selects is a module for Django which enables editing of ForeignKey, ManyToMany and CharField using jQuery UI Autocomplete

When user types a search term into the text field an ajax request is sent to the server and a dropdown menu is populated with results. User selects by clicking or using arrow keys. Selected result displays in the "deck" area directly below the input field. User can click trashcan icon to remove a selected item

Features:

  • Django 1.2+
  • Optional bootstrap mode allows easy installation by automatic inclusion of jQueryUI from the googleapis CDN
  • Compatible with staticfiles, appmedia, django-compressor etc
  • Popup to add a new item is supported
  • Admin inlines now supported
  • Ajax Selects works in the admin and also in public facing forms.
  • Rich formatting can be easily defined for the dropdown display and the selected "deck" display.
  • Templates and CSS are fully customizable
  • JQuery triggers enable you to add javascript to respond when items are added or removed, so other interface elements on the page can react
  • Default (but customizable) security prevents griefers from pilfering your data via JSON requests

Projects website:

67 questions
0
votes
4 answers

Django: CSRF with AJAX

I have a problem/bug found? in AJAX with CSRF. I don't use {% csrf_token %} at all. I use only AJAX forms so - there is no cookie set for csrf. In taht case - enter link description here is useless :( I can use get_token to generate it, but I have…
tunarob
  • 2,768
  • 4
  • 31
  • 48
0
votes
1 answer

Getting query length with Ajax / Django

According to the selection in the form, I want to get the number of records that match the id of the selected data as an integer. Here is my view : def loadRelationalForm(request): main_task_id = request.GET.get('main_task_id') …
Eric Maniel
  • 102
  • 4
0
votes
0 answers

Django Ajax Dropdown Select2 not return data

There is a dropdown form that I created with ajax. The form works without using the Select2 tag and returns data. But when I enter the select2 tag, it does not show the detail that should be displayed according to the selection. I use select2 for…
Eric Maniel
  • 102
  • 4
0
votes
1 answer

Sending data to database with JavaScript in Django

I need to write a compatible algorithm for this code, but I can't. How can I send data to backend? I am using bootstable.js for table HTML table: …
0
votes
1 answer

Ajax post request is printing json response on empty html page instead of html signup page

I am making a website in django with ajax.I have created a base html file django template and two other html templates named signup.html and home.html. I have written code to make ajax request with signup form in base.html file like…
0
votes
2 answers

Can not get comment id with AJAX in django

I'm fighting with this problem during several days and can not find the solution for my case. I'm trying to make system of likes without refreshing the page. In synchronous mode system of likes and dislikes works fine, but when I'm trying to add…
0
votes
1 answer

How to submit a form with django ajax without parsing the input

I have a modal form that I use when users need to create something without leaving the page they are on. And to avoid refreshing the page after the modal form submission, I am using ajax to submit the form. For a series of reasons, I can't parse the…
giaggi
  • 542
  • 5
  • 16
0
votes
1 answer

What is ajax gets invalid form, How can i render it?

I am working with Django and Ajax. With the help of jQuery, i successfully sent form data to server and able to validate it. Problem arrive when form is invalid, i want that, if the form is invalid, ajax get the invalid form and render it to same…
Verma
  • 173
  • 9
0
votes
1 answer

asynchronus form submission django

I'm using ajax to submit a form, and it's working. But it's not working asynchronously. When I'm trying to upload files it uploaded successfully and then the page loads again. I want it to make asynchronously. In addition, I want to make a progress…
0
votes
1 answer

django ajax like button with css classes

hello I have a post model which has a like(m2m) and user(forgeinkey) model field and Im trying to check if the request.user has liked the post and if they have, I should show them a red heart button else a blue heart should be shown, now since there…
0
votes
1 answer

Djago dependent dropdown list using AJAX jQuery not working in Template

im doing a django dependent form and it works for my create view but not in update view. I tink the problem is the jQuery cdn library, i think its a conflict with the bootstrap cdn. The AJax call does not fire. Any idea maybe there is a simpler way…
0
votes
1 answer

how to get data from different table using ajax in form of checkbox in django

Here i want to have my contactperson data in form of checkbox but using ajax call,I am able to bring in form of dropdown but after doing changes for converting it in form of checkbox its not working can anyone tell me how to change it views.py def…
0
votes
1 answer

How to solve page not found error in Django?

I have a list of multiple projects on my page, and each project have a contact use button, if a user click on contact us page then it will open a popup form, and I am doing this using Ajax. But whenever i click on the button it displays page not…
0
votes
1 answer

How to access fetched data in Ajax response using Django?

i am trying to access data from view function to ajax response.here i am Getting data in my Views.py and i want to access that data in ajax Response. i don't know hoe to do that? Hare is my Code in My Views.py This is My views.py. i am calling this…
user13940110
0
votes
1 answer

'+add' button doesn't work properly when django-ajax-select is used

In short: django-ajax-selects works fine with filtering existing items, but gives JS error by adding new item. Details. Using Django 3.1. At Admin site one needs to create object of model Choice with ForeignField to model Question.…
OlegТ
  • 173
  • 9
Name