unfoldadmin / django-unfold

Modern Django admin theme for seamless interface development
https://unfoldadmin.com
MIT License
1.04k stars 96 forks source link

Layout of autocomplete field broken in changelist #326

Closed raimondi1337 closed 1 month ago

raimondi1337 commented 1 month ago
@admin.register(Game)
class GameAdmin(ModelAdmin):
    list_display_links = ["title"]
    list_display = ["title", "studio", "rating"]
    list_editable = ["studio", "rating"]
Screenshot 2024-03-19 at 4 52 31 PM
Daspy11 commented 1 month ago

+1, this would be a great boon for us if it worked correctly

raimondi1337 commented 1 month ago

+1, this would be a great boon for us if it worked correctly

I fixed it for myself with this ./myapp/static/admin.css

.related-widget-wrapper > select {
  width: auto;
  background-color: transparent;
}

.related-widget-wrapper-link {
  display: none !important;
}

./myproject.settings.py

UNFOLD = {
    ...,
    "STYLES": [
        lambda request: static("admin.css"),
    ],
}
lukasvinclav commented 1 month ago

Thanks for report. Fixed in #335