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

Trouble searching User model using django-ajax-selects

I´m using django-ajax-selects in my project, and I can´t make it to work with django.contrib.auth.models.User. All I want to do is search the username field and I don´t know how to put it in my settings.py. What I have now is: AJAX_LOOKUP_CHANNELS =…
fceruti
  • 2,405
  • 1
  • 19
  • 28
1
vote
1 answer

How to use ajax in django, to pass the model object and store it in database without refreshing the page?

I'm doing a small project in Django, in that I thought of adding a favorite button in one of the pages so that on clicking on that button it has to return the model object and it has to be stored in another database for the reference, but it's not…
1
vote
1 answer

Ajax and Django to get a multi-select smart panel to work dynamically

Please any idea how i can achieve something like this with Ajax and Django. Lets say a medical app. I'll like to multi-select medicine while it shows in a different panel and add the amount(s) sum and show me like the right text-boxes..
1
vote
1 answer

Django ajax-selects package is not working. What I am missing?

I am trying to use Django ajax-selects package I have my form.py : from ajax_select.fields import AutoCompleteSelectField, AutoCompleteSelectMultipleField from ajax_select import make_ajax_field class LeaseTenantForm(forms.ModelForm): class…
Ilya Bibik
  • 3,924
  • 4
  • 23
  • 48
1
vote
2 answers

I can't seem to make django-ajax-selects work

I have followed the installation guide for django-ajax-selects at this url, and still, nothing happens : when I type something into the rendered field, nothing is displayed, to POST request are sent, etc.. Because this package was made for the…
Raphaël Gomès
  • 938
  • 1
  • 8
  • 23
1
vote
1 answer

django-postman + django-ajax-selects usage

So i have just started using django-postman==3.2.2 and i am trying to integrate auto-complete using django-ajax-selects==1.3.6 while using django-authtools==1.2.0 to have a custom user model with no luck. settings.py AJAX_LOOKUP_CHANNELS = { …
psychok7
  • 5,373
  • 9
  • 63
  • 101
1
vote
1 answer

AJAX call to populate Select Widget - Python Django

I'm trying to get an ajax call (in django) to populate a select box on my web page based on the selected item of another. i'm new to python, django and jquery/javascript so I'm not too suprised it's not working. I have the following form.py class…
Mark Corrigan
  • 544
  • 2
  • 11
  • 29
1
vote
0 answers

django-datatables-view not displaying content returned from AJAX request?

My Ajax request to update the tables is not working. Attached is the screenshot. It simply displays "processing" but nothing happens. The JSON object that is returned (if i visit the URL -{% url 'search_list_json' %} --used in AjaxSource of Js code…
brain storm
  • 30,124
  • 69
  • 225
  • 393
1
vote
1 answer

django-ajax-selects raises Exception object not found for many to many admin inline

I am using django-ajax-selects to facilitate user input in Django admin; specifically in a many to many relation where the 'through' model is inlined: models.py class Part(models.Model): item_code = models.CharField(max_length=100,…
blaise
  • 383
  • 1
  • 5
  • 16
1
vote
1 answer

Django_ajax_selects not returning anything

I'm trying to figure out django_ajax_selects and struggling; either the documentation is wrong/unclear or I'm an idiot. Or both. I'm just trying to get the basics working, and then I'll get it up to speed. I have the field displaying but there's…
thumbtackthief
  • 6,093
  • 10
  • 41
  • 87
1
vote
1 answer

configuring ajax lookup in django ajax_lookup

I was using the django_ajax library for ajax lookup in one of the form elements. The model: class Alpha(models.Model): name = models.CharField() description = models.TextField() submitted = models.BooleanField(default=False) The form…
whatf
  • 6,378
  • 14
  • 49
  • 78
1
vote
0 answers

Django: make an field already filled working as query on form. ajax-selects

I'm having trouble to make an field already filled working as query on form. I'm using ajax-select to render the fields. forms.py class FormMakeOccurrence(forms.ModelForm): class Meta: model = ManageOccurrence fields =…
cleliodpaula
  • 819
  • 2
  • 11
  • 27
1
vote
1 answer

How to pass a "request" parameter at the time of calling a method in template tags in django

I am stuck in a very weird situation. There is a two method defined in templatetag/somefile.py with named : ajax_print_widget and render_widget def ajax_print_widget(request, template, context1 ): if request.is_ajax(): q = request.GET.get(…
Amit Pal
  • 10,604
  • 26
  • 80
  • 160
0
votes
3 answers

How to upload a image using Ajax in django

Background : I have a simple model form with a image field. class XYZForm(ModelForm): class Meta: model = XYZ fields = ( 'file',) The model is class XYZ(models.Model): url = models.URLField(null = True) file =…
Akash Deshpande
  • 2,583
  • 10
  • 41
  • 82
0
votes
0 answers

How add to ajax request additional GET params in django-ajax-select?

I need sent parametr region with ajax request in select. Select sending ajax without additional parameter `@register('address') class TagsLookup(LookupChannel): model = Address def get_query(self, q, request): **region =…