Django-jet: django-smart-selects not working in jet

Created on 31 May 2016  路  15Comments  路  Source: geex-arts/django-jet

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.

Most helpful comment

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

All 15 comments

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.

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

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.

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.

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.

I have the same problem.

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.

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.

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

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

Will be very useful that you put here a tracebak.

@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.

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

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

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

Welcome! 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kevin-miles picture kevin-miles  路  5Comments

VincentVW picture VincentVW  路  5Comments

a1Gupta picture a1Gupta  路  7Comments

annamalaissh picture annamalaissh  路  5Comments

pwndr00t picture pwndr00t  路  4Comments