pip install django-autocomplete-light
doesn't install v2
Just try on a fresh virtualenv and you'll see that pip doesn't install alphas (all released v2s are alphas) by default:
[env] 16/01 2014 01:37:11 jpic@etta /tmp
$ virtualenv foo
Using real prefix '/usr'
New python executable in foo/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
[env] 16/01 2014 01:37:17 jpic@etta /tmp
$ cd foo/
[foo] 16/01 2014 01:37:20 jpic@etta /tmp/foo
$ pip install django-autocomplete-light
Downloading/unpacking django-autocomplete-light
Downloading django-autocomplete-light-1.4.12.tar.gz (52kB): 52kB downloaded
Running setup.py egg_info for package django-autocomplete-light
warning: no files found matching '*.mo' under directory 'autocomplete_light'
Installing collected packages: django-autocomplete-light
Running setup.py install for django-autocomplete-light
warning: no files found matching '*.mo' under directory 'autocomplete_light'
Successfully installed django-autocomplete-light
Cleaning up...
[foo] 16/01 2014 01:37:36 jpic@etta /tmp/foo
$ pip install -U django-autocomplete-light
Requirement already up-to-date: django-autocomplete-light in ./lib/python2.7/site-packages
Cleaning up...
You can import autocomplete_light; print autocomplete_light.__path__
to check where python loads it from.
Upgrading to v2
get_widgets_dict
was indeed removed from v2 because v2 has a better design which makes uses of form fields.
You're extending autocomplete_light.ModelForm
, you don't need anything else. Now you could set Meta.autocomplete_excludes
, Meta.autocomplete_fields
, Meta.autocomplete_names
if you wanted to override autocomplete_light.ModelForm
's default behaviour.
FTR, upgrade docs are here: http://django-autocomplete-light.readthedocs.org/en/v2/1to2.html
You're picking examples from v1 and trying to apply them on v2 !
I can garantee that no example in the test_project of the v2 branch uses get_widgets_dict
, it's been completely removed in favor of form fields which allow better validation flow and performance.
Your problem is already solved
I bet that you have solved your problem by yourself, removing the call to get_widgets_dict
by now. Particularely since it's in bold in the README: https://github.com/yourlabs/django-autocomplete-light/
I'm sorry, I didn't think it would be so hard for users to follow... oh well I guess I'm still learning ;)