Forums

Problem with django-smart-selects

I've installed this on my pythonanywhere server. I'm using code that worked fine on my local machine, and it doesn't seem to work on the server. I'm trying to do 'chained select's. The drop down list for the second field comes up empty. This (to me) is a sign that smart-selects is affecting the drop down box, just not properly. Has anyone else experienced this?

All sorted. The jquery module (or whatever) weren't loading. I ran python manage.py collectstatic and that fixed us right up.

Glad you figured it out :D

              / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄\
 <<<<<<:>~  <   Yay!           |
               \_________/

I think that I have the same problem: Screenshot of console errors

I checked the paths /static/admin/js/.. for the files and found them in the correct folders. However, when I run python manage.py collecstatic It throws an exception:

"django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path."

Should I simply point STATIC_ROOT to my static dir ?

It worked just setting the STATIC_ROOT to os.path.join(BASE_DIR, 'static'). I had to remove the STATICFILES_DIRS = [ STATIC_PATH,] because both were pointing to the same place.

yup. that's because staticfiles_dir is the list of file directories from which files will be collected and then put into static_root

I have facing the same issue again. I have tried all the methods above. but still it doesn't work.

What same issue? There are a number of issues discussed in this thread. If you're having trouble with static files, we have a debugging guide

Problem with django-smart-selects I've installed this on my pythonanywhere server. I'm using code that worked fine on my local machine, and it doesn't seem to work on the server. I'm trying to do 'chained select's. The drop down list for the second field comes up empty. This (to me) is a sign that smart-selects is affecting the drop down box, just not properly.

If the table that smart-selects is getting its data from is empty, then the dropdown will be empty. Check that there is actually data in the table for smart-selects to put in the dropdown.