Closed ofathy closed 3 years ago
In the branch js-unlinting-fixes
in admin page, the 1st chained foreign key which is dependent on a foreign key is rendered correctly for me.
However, the 2nd-degree (or more) chained foreign key field, which is dependent on the 1st chained foreign key field, is not rendered correctly. If the 2nd-degree (or more) chained foreign key field was previously edited or has a previously set data-value
before loading the admin page, what is being rendered is the empty option and not the previously-set value
.
I'm using ChainedForeignKey for admin page. The values in the 2nd drop-down is not rendered at all. When I set 'show_all=True', then all the values (unfiltered) are rendered. What is the fix?
Are you using js-unlinting-fixes
branch?
I did pip install 'git+https://github.com/digi604/django-smart-selects.git@js-unlinting-fixes' and even an upgrade from issue#253 solution. I also did 'collect static' and added the chainedfk.js(), chainedm2m.js() to the Base.html of my admin template. Finally works like charm with IE and Firefox. But with Chrome it's the never ending error 'Uncaught ReferenceError: chainedfk is not defined' at line12 of bindfields.js. Nevertheless, javascript is enabled in chrome.
@ofathy can you reproduce with latest master version?
Closing due to inactivity
You MUST use this template when reporting issues. Please make sure you follow the checklist and fill in all of the information sections below.
All versions of django-smart-selects prior to version 1.2.8 are vulnerable to an XSS attack as detailed in issue 171. As a result, all previous versions have been removed from PyPI to prevent users from installing insecure versions. All users are urged to upgrade as soon as possible.
Checklist
Put an
x
in the bracket when you have completed each task, like this:[x]
master
branch of django-smart-selects.smart_selects
app.models.py
,forms.py
, andviews.py
with problems.Steps to reproduce
Actual behavior
Expected behavior