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

raw_id_fields is not work correct #313

Closed
artel1992 opened this issue Mar 11, 2024 · 2 comments
Closed

raw_id_fields is not work correct #313

artel1992 opened this issue Mar 11, 2024 · 2 comments

Comments

@artel1992
Copy link

How I can create this widget?

I need to get relation through window. But not

@aasimmk
Copy link

aasimmk commented May 28, 2024

I am not sure if you have tried autocomplete but it works well in unfold.

I would suggest to try it as this is more intuitive than raw id field. If you want try it, here is the quick/rough implementation. Thanks!

@admin.register(MODEL_NAME)
class SomeModelAdmin(admin.ModelAdmin):
    list_display = ....
    list_filter = ....
    autocomplete_fields = ("FIELD_NAME",)  <--- put the raw id field name here

@lukasvinclav
Copy link
Contributor

Fixed #424

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

No branches or pull requests

3 participants