Questions tagged [django-smart-selects]

36 questions
0
votes
0 answers

Django smart select not work if i add CSS style

I have a little problem with django's function: "django-smart-select". Basically django-smart-select works until I add a CSS class to a form-field. Here is my example: in models.py: from django.db import models from smart_selects.db_fields import…
GM02
  • 15
  • 4
0
votes
2 answers

Django forms - limiting options from fields based on the answer of another field

I have a Django form that receives entries from the users with information on a surgical procedure. Each Procedure will have only one (surgical) Technique and only one Diagnosis. Each Technique may be related to a limited number of Diagnosis, and…
0
votes
0 answers

Django smart selects doesn't work with JS cloning

I'm trying to create a page with ability to add any amount of form-copy. I use django-smart-selects to make my form's field chained. It works fine if I have only 1 form on page. Then I'm using javascript to make a function to clone form instance by…
0
votes
1 answer

python django smart-selects is not working properly

I have install django-smart-selects but when i add the url in the urls.py url(r'^chaining/', include('smart_selects.urls')), when i run my application after this i got this error from django.utils.encoding import force_text ImportError:…
Hamza.S
  • 1,319
  • 9
  • 18
0
votes
1 answer

django: smart-select ChainedForeignKey / chained dropdown in admin

Hej! :) I have 5 models which are connected hierarchical with each other. Section -> division -> group -> class -> wz one section can have multiple divisions, but one division can only have one section (and so on). Therefor I have ForeignKeys set: #…
piah
  • 95
  • 1
  • 12
0
votes
1 answer

Django, smart-select, chained select doesn-t work from html

I try to use chained select (smart-select), it works from the admin panel, but doesn't work from template (html). settings: JQUERY_URL = False USE_JQUERY_DJANGO = True ​ ​ ​ html:
0
votes
1 answer

how I can send sms to user when new record insert

I have model Order class Order(models.Model): STATUS = ( ('Pending', 'Pending'), ('Out for delivery', 'Out for delivery'), ('Delivered', 'Delivered'), ) shop = models.ForeignKey(Shop, models.CASCADE, null=True) customer =…
0
votes
1 answer

Django smart_selects chained field coming up empty

I am trying to implement chained dropdown list using Django smart_selects. But its not working as expected. After selecting the first dropdown, the second dropdown is not populating. model.py: class ServerInfo(models.Model): server =…
0
votes
3 answers

django-smart-selects not working properly

I want to have chained foreign key in my django-admin and thus I am using django-smart-selects. I have followed the documentation properly Install django-smart-selects Add it in installed_apps in settings.py Add this line in my base urls.py …
0
votes
1 answer

Django AutoComplete Light Filter Foreign Key Values

I am using the Django AutoComplete Light library to filter Form values based on a Primary key. I have two models as below: class Skill(models.Model): name = models.CharField(max_length=50) def __str__(self): return self.name class…
0
votes
1 answer

I use two interconnected ChainedForeignKey fields, but they don't. why?

my problem: I have three models. il (province), ilce (district) and mahalle (neighborhood). I filter with smart-select. works smoothly in the entry of information. When I looked at the database, I saw that mahalle (neighborhood) data was recorded.…
0
votes
0 answers

how to implement dependent dropdown list based on value from foreign model in admin panel

I have classes like this: class Building(models.Model): name = models.CharField(max_length=10) floors= models.IntegerField() def __str__(self): return self.name class BuidingAccessRole(models.Model): role_name =…
0
votes
0 answers

How I can get chained objects in my project

I have chained models -> Category - Brand - Type. For example : Category : Light vehicle Brand : Volkswagen Type : Passat And I have an Post Model. Question : How i can get chained objects in the form? Code: class Category(models.Model): …
rudiq
  • 15
  • 2
0
votes
1 answer

Add Custom Widget to Multiselect field (Sumoselect) - Django Smartmin

I having Model field which has ManyToMany field in which i want to select the multiple selection. The default selection will be shown. How to override to show Sumo select instead of that.
0
votes
1 answer

Refresh Drop-down based on selection - Django Smartmin

We have models like: Class District: name = models.CharField() Class Village: name = model.CharField() district = models.Foriegnkey() Class Location: name = models.CharField() village = models.Foreginkey() We are using Smartmin for…