jazzband / django-smart-selects

chained and grouped selects for django forms
https://django-smart-selects.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.12k stars 352 forks source link

Can not choose country when select Continent in Django==2.0.7 #268

Closed leo493852107 closed 4 years ago

leo493852107 commented 6 years ago

Enviroment

Python 3.6.5 Django 2.0.7 django-smart-selects 1.5.4

Steps to reproduce

  1. write sample model as you provide.
  2. add Continents and Countrys datas.
  3. add Locations: select one of Continent, can't select Country

Actual behavior

Cannot select country in add Locations view when select Continent

Expected behavior

Can select country

Others

Also tried in settings.py USE_DJANGO_JQUERY = True / USE_DJANGO_JQUERY = False

Thanks for your reading

zxh326 commented 6 years ago

I have the same problem with this version.

and console print this error Uncaught ReferenceError: chainedfk is not defined

bugielektrik commented 6 years ago

Also, I have the same problem with this version.

gb119 commented 5 years ago

I think this is being caused by the "use strict"; at the start of chainedfk.js. Also to get this working in Django 2.1.x you need to edit widgets.py to add remderer=None in all def render(....): function defintitions and renderer=renderer in the corresponding super() calls. Contributor map711 seems to have the former fix in place, but not the latter.

manelclos commented 4 years ago

@leo493852107 can you reproduce with latest master version?

manelclos commented 4 years ago

Closing due to inactivity