This package does not currently appear to be thread safe. When running this package under gunicorn with multiple workers (I used 4 for my sample), flex select fails with the below traceback. For your reference my setup was django 1.5.5 on Python 2.7.3 with nginx proxying to gunicorn 18.0.
2013-11-18 08:57:51,967 django.request ERROR Internal Server Error: /flexselect/field_changed
Traceback (most recent call last):
File "/home/xxx/xxx/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/xxx/xxx/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/xxx/xxx/local/lib/python2.7/site-packages/flexselect/views.py", line 17, in field_changed
widget = FlexSelectWidget.instances[hashed_name]
KeyError: u'_7f7204089cbe1187f19ebc6d47c87c273bb9bb52'