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
1 answer

How to display Ajax response data in Popup?

I have some data in response but I want to display that data in the popup, please let me know how I can display Ajax data in the popup. here is my views.py file... def myview(request): datas=TestForm.objects.all template_name='test.html' …
0
votes
0 answers

Call View Function and send FCM Without Refresh Page Using AJAX In Django

When i click on a href they go on Script code but form Script not call the views.py function! Link code:: Script…
0
votes
1 answer

I use two interconnected ChainedForeignKey fields, but they don't. why?

my problem: I have three models. il (province), ilce (district) and mahalle (neighborhood). I filter with smart-select. works smoothly in the entry of information. When I looked at the database, I saw that mahalle (neighborhood) data was recorded.…
0
votes
1 answer

django with ajax: function not loading from source file

In my Django project I'm trying to add a datepicker using jQuery. When I load page in a browser the console gives me an error: Uncaught TypeError: $(...).datepicker is not a function I tried the same AJAX code in a simple HTML page and it works…
sanghmitra
  • 21
  • 2
  • 9
0
votes
1 answer

I need to change the value of a field and redirect to a url on button click. How am I supposed to do it?

I am working on a problem where I need to change the value of a model field "verified" on button click and redirect it to mail url so the the verified users get mail. I am not familiar with ajax. Please help me out in doing this. models.py: class…
Srvastav4
  • 177
  • 2
  • 12
0
votes
1 answer

Redirect to root url in AJAX

I'm looking for a way to start URL with ('') instead of ('search/') in AJAX request. I can workaround this problem simply add new path in URL dispatcher with path('search/email_add//', views.email_add, name="email_add_from_search") but it's…
0
votes
1 answer

Django-ajax-selects with AJAX_SELECT_BOOTSTRAP = False

At work we are using django-admin webapp. I wanted to implement django-ajax-selects functionality to some of fields. Our network is isolated from Internet and I cannot use django-ajax-selects's CDNs. Documentation says that in such case you should…
Artem Ilin
  • 353
  • 2
  • 19
0
votes
1 answer

Can't understand from where this script is making ajax call (no $.ajax)

I am a using ajax_select app for autocomplete, it is having its predefined JavaScript file for autocomplete, working fine for me, but I also want to add some extra paras in ajax call, now it is calling to url -…
Pankaj Sharma
  • 2,185
  • 2
  • 24
  • 50
0
votes
1 answer

How to render default values in django-ajax_select field

I am using ajax_select for my m2m and foreign key fields, its working fine but it is not rendering default value of that field, it is rending empty value ("|"). I am not using ajax_select in my admin panel, so when I open that form in admin panel,…
0
votes
1 answer

Two Ajax calls only meet one condition at a time

I have the following script that sends a POST of my select option to a url called requestaccess. This works great when using only one of the two, but when I change the other field the result of the POST is None for the first and correct for the…
student101
  • 512
  • 3
  • 6
  • 16
0
votes
3 answers

Apply conditions in Ajax success Method on received data from Django's view

I'm working on a Django project in which I need to handle a form via ajax.I'm sending ajax request to Django view and getting back the response in JSON format, now I need to apply if-else conditions on that data but these conditions are not working,…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
0
votes
1 answer

Getting django-ajax_selects to work in my search form in Django

I'm trying to make a search form that uses AJAX Select so that when I type an entry into a field, there will be a dropdown that contains a list of an attribute from all of the model objects that match the text typed in. Here is the relevant…
Jerry Bi
  • 321
  • 6
  • 24
0
votes
1 answer

Display something upon a change to a BooleanField in a django database in django app

I have an uber like django app. A customer can signal that they are looking for someone to provide a service and people in the same area who are looking to be service providers can view a list of actively seeking customers. When the customer presses…
Justin O'Brien
  • 129
  • 1
  • 3
  • 9
0
votes
1 answer

Django 403 forbidden error ajax (with csrf token) GET

I'm using django-ajax-selects to select a city from my database. When typing in the field, I get a 403 error (GET method). Here's the catch, it worked yesterday, and I didn't touch anything relevant. Console log Forbidden (Permission denied):…
Raphaël Gomès
  • 938
  • 1
  • 8
  • 23
0
votes
1 answer

django-ajax-selects inline 'add another' won't bind

I am using django 1.6 admin-panel with django-suit, and I am trying to make a tabular inline that will auto-complete me with a name of a model instance. For this I use django-ajax-selects. Now, if I define, let's say, extra = 3, then I will have 3…
Amir Tugi
  • 2,386
  • 3
  • 16
  • 18