Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django-smart-selects not working in jet #67

Open
neotrons opened this issue May 31, 2016 · 15 comments
Open

django-smart-selects not working in jet #67

neotrons opened this issue May 31, 2016 · 15 comments

Comments

@neotrons
Copy link

How to create a cascade select in django jet? I am integrate django-smart-selects in my admin but not working. when i use django-admin default not has problem.

@SalahAdDin
Copy link
Contributor

Are you shure that isn't problem with django-smart-selects? I say because i'm using it and i don't know if the problem is that django-jet doesn't user normal input selects or if a problem with the current django-smart-selects, i report an issue there.

@neotrons
Copy link
Author

neotrons commented Jun 7, 2016

Hi sir thanks for your time what version do you use?

I use this version

Django==1.8.3
django-jet==0.1.4
django-smart-selects==1.2.2

thanks

@SalahAdDin
Copy link
Contributor

I have these version but i'm working with custom branch, but, if the lastest version doesn't works i think that is a smart-selects problem.

@neotrons
Copy link
Author

neotrons commented Jun 7, 2016

thanks sir, please 1 questions. how i can access the change event (jquery) in the select.

i use but not fount the event

$("#id_selectname").change(function(e){
alert("test");
});

thanks.

@vitorfragoso
Copy link

I also think there is a problem between Jet and Smart Select. I was using Smart Select successfully before install the Jet template. After install Jet, the Smart Select has stopped working.

In my case, I have two fields that are: team_name and employee_name. The employee_name should be loaded based on team_name.

Something like that:
team_name = models.ForeignKey(Team)
employee_name = ChainedForeignKey(
Employee,
chained_field="team_name",
chained_model_field="team_name",
show_all=False,
auto_choose=True,
unique= True)

Now the problem is that the employee_name field is not loaded after select the team_name.

@SalahAdDin
Copy link
Contributor

I have the same problem.

@vitorfragoso
Copy link

vitorfragoso commented Aug 8, 2016

I have observed the following behavior:

  • Field B depends on Field A.
  • Both fields are required.

When I fill out Field A, keep the Field B as blank and try to save Then Field B is loaded.
After this behavior, I can fill out Field B and finally save.

I believe we should call a specific JS when a user click on Add/Edit New Item. It seems to be a JS that we are calling after try to save.

Note: i tested the Smart Selects with Django-Suite template and it works fine.

@hakimkal
Copy link

I have realised the reason is django-jet (0.1.2) uses jquery 1.11.3 and django-smart-selects uses jquery 2.2.0. this is the conflict point, hence from django admin area, it creates conflict.

@SalahAdDin
Copy link
Contributor

SalahAdDin commented Feb 26, 2017

@hakimkal, are you sure about it? Have you a bug's trace back?

@hakimkal
Copy link

@SalahAdDin yes, I am very sure. i had to revert to the default django-admin UI to use django smart-select.

@SalahAdDin
Copy link
Contributor

Will be very useful that you put here a tracebak.

@hakimkal
Copy link

@SalahAdDin , yes I would love to do that, but right now I have no project using django-jet and django-smart-select. however maybe in the future. so sorry.

@SalahAdDin
Copy link
Contributor

@hakimkal so bad, do you think if problem is with oudated jquery version? or do you think is for newest jquery version?

@scrummastermind
Copy link

scrummastermind commented May 2, 2017

This is JQuey binding issue, jet uses django jQuery while smart select uses google api by default

just simply for smart select in your django settings place

JQUERY_URL = False

@Ismael-VC
Copy link

Please come to the django-jet Discord server so we can organize if you like:

Welcome! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants