Closed 4mritGiri closed 1 month ago
This issue has been resolved by following the necessary steps. Specifically, I forgot to unregister the User and Group models before re-registering them with custom UserAdmin and GroupAdmin configurations.
The fix involved adding the following code in admin.py:
# admin.py
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.admin import GroupAdmin as BaseGroupAdmin
from django.contrib.auth.models import User, Group
from unfold.admin import ModelAdmin
admin.site.unregister(User)
admin.site.unregister(Group)
@admin.register(User)
class UserAdmin(BaseUserAdmin, ModelAdmin):
pass
@admin.register(Group)
class GroupAdmin(BaseGroupAdmin, ModelAdmin):
pass
Thank you for your support.
What version of Unfold are you using?
version==0.38.0
What version of Django are you using?
django==5.1.1
What browser are you using?
Google Chrome 128.0.6613.137 Brave Browser 128.1.69.168
Did you checked changelog/commit history, if the bug is not already fixed?
Yes
Did you searched other issues, if the bug is not already fixed?
Yes
Issue
There seems to be a style issue with the form where some input fields, checkboxes, and file upload elements are not properly aligned or styled. Specifically:
The text input fields such as "Edition," "Available copies," "Publisher," and "Publication date" appear cramped and not aligned uniformly.
The checkbox for "Out of stock" is misaligned with the text.
The file input fields for "Cover image," "Book spine," and "Ebook file" are unstyled and appear inconsistent with the theme of the rest of the form.
The entire form lacks proper spacing between elements, which makes it difficult to read and navigate.
Steps to Reproduce:
Navigate to the page containing the form.
Observe the misalignment of input fields and checkboxes.
Compare the form styling to the rest of the page/theme.
Expected Behavior: The form elements should be properly aligned with consistent styling. There should be adequate spacing between form inputs and buttons, and file input fields should have appropriate styling.
Screenshot:
And also multiple deletion action button hidden