Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ForeignKey without auto_field #424

Closed
perthvader opened this issue May 26, 2015 · 2 comments
Closed

ForeignKey without auto_field #424

perthvader opened this issue May 26, 2015 · 2 comments

Comments

@perthvader
Copy link

class Item(models.Model):
    id = models.CharField(primary_key=True)

class MyInlineForm(forms.ModelForm):
    item = autocomplete_light.ModelChoiceField('ItemAutocomplete', label=_(u"Item"))

Fails on line 165: autocomplete_light/widgets.py in render

Is there a builtin solution for non-integer primary keys or should I rewrite the methods within the item's registry module?

@jpic
Copy link
Member

jpic commented May 26, 2015

Fails on line 165: autocomplete_light/widgets.py in render

Please paste the full traceback.

Could you try with 2.2.0rc1 which was released yesterday ? It fixes #413 with #417. Should work for you.

Thanks

@perthvader
Copy link
Author

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants