question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't Apear chained_field value

See original GitHub issue

Actual behavior

1- I Install Djnago Smart Selects by this commend pip install django-smart-selects

2- Added in settings => installed_apps + Add JQuery Permission line : INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'MyApp', 'smart_selects', ] USE_DJANGO_JQUERY = True

3- models.py :

`class Topic(models.Model): user = models.ForeignKey(CustomUser, on_delete=models.CASCADE) title = models.CharField(max_length=400) image = models.FileField(blank=True, null=True) created_date = models.DateTimeField(auto_now=True)

class Reply(models.Model): user = models.ForeignKey(CustomUser, on_delete=models.CASCADE) topic = models.ForeignKey(Topic, on_delete=models.CASCADE) reply = models.TextField() created_date = models.DateTimeField(auto_now=True)

class Likes(models.Model): user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True) topic = models.ForeignKey(Topic, on_delete=models.CASCADE, null=True) reply = ChainedForeignKey( Reply, chained_field=“topic”, chained_model_field=“topic”, show_all=False, auto_choose=True)`

4- admin.py : class LikesAdmin(admin.ModelAdmin): admin.site.register(models.Likes, LikesAdmin)

5- urls : urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^my-app/', include('MyApp.urls')), url(r'^chaining/', include('smart_selects.urls')), ]

Result : Reply’s field keep empty after selecting Topic field Not working either in admin panel and templates

Did I Miss Any thing ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
GrilloLucacommented, Mar 25, 2018

check this issue: https://github.com/digi604/django-smart-selects/issues/253 Solution: RafaDias/django-smart-selects@61f182f

0reactions
meibassamcommented, Mar 25, 2018

That worked I Hope Disruption Update as soon as possible thx @GrilloLuca

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Implement Dependent/Chained Dropdown List with ...
Dependent or chained dropdown list is a special field that relies on a previously selected field so to display a list of filtered...
Read more >
Chained Select in Fluent Forms - WP Manage Ninja
Chained Select is a dynamic dropdown field for creating dependent dropdowns from CSV data that dynamically populates a set of select ...
Read more >
Express-validator's default sanitizer doesn't work when chained
The issue is optional validator just completely ignores validation chain if value is undefined . You have to decide whether you need ...
Read more >
Resolvers - Apollo GraphQL Docs
Apollo Server needs to know how to populate data for every field in your schema so that it can respond to requests for...
Read more >
Chained Selects Change Log - Gravity Forms Documentation
Fixed an issue where the first item in a chained select dropdown doesn't work ... Updated output of field value in entry detail...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found