Closed ap9313 closed 4 years ago
Hi @ap9313,
looking at your stack trace, it looks like you are working on macOS.
It like redis isn't running. Would you mind restarting brew services restart redis
and trying again?
Best, Joe
Hey @codingjoe,
yes I'm using macOs, pyCharm as editor and an sqllite db for the moment. I ran the command to restart the service and it didn't work. i installed i prior with pip install.... now i also installed it with brew and started the service, added the ip and port on which it runs and it still doesn't work. I get the form and see the field but it has no data in it! when i type something in the field, i get the following console error: Failed to load resource: the server responded with a status of 500 (Internal Server Error).. any hints?
Regards, Attila
Hi Attila, you need to make sure, that you have Redis server installed and setup. The latter is simple, since the brew version is preconfigured correctly.
A simple brew install redis
should solve your issue.
If it doesn't I recommend reading into the Redis and Django-Redis documentation.
Best, Joe
Hi Johannes,
as i said: i installed it with brew afterwards, started the service and it still doesn't work. i switched from ModelSelect2MultipleWidget to Select2Widget and the widget works! but when i try to save/add/update (aka POST) a service: it doesn't work ๐๐!
Thanks for the tipps! I'm one step ahead now, i'll have to figure out the next solution now ๐ ๐๐ป
Regards, Attila
Since this seems to be a different issue, could you open a new ticket for that. Preferably on the proper repo: https://github.com/codingjoe/django-select2/issues
Best, Joe
Hi! I'm trying to use a ModelSelect2MultipleWidget to represent a manyto many field from my model. And i can't get it to work
this is where i define my form in my form.py:
this is a snippet of my template where i use the form.
this is the setting.py
and i also added the path to my url.py like
path("select2/", include("django_select2.urls"))
this is what i got before setting up the cache with django_redis.cache.RedisCache:
after setting the cache like in the docs, i get a connection error:
Can you help me out? What am i missing/ what am i doing wrong? Thanks a lot! ๐