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

The admin interface cannot input Entity #78

Open
coufxr opened this issue Feb 6, 2025 · 2 comments
Open

The admin interface cannot input Entity #78

coufxr opened this issue Feb 6, 2025 · 2 comments

Comments

@coufxr
Copy link

coufxr commented Feb 6, 2025

Describe the bug
When using the default user model The management interface cannot input entities.
Did I configure it incorrectly, but I followed the quick start execution

Expected behavior
It should be possible to select or create entities. Just like other foreign keys

Screenshots
As shown in the figure, Entity cannot be operated
Image

Desktop (please complete the following information):

  • OS: win 10
  • Python Version: 3.12
  • Django Version: 5.1.6
  • DRF Version: 3.15.2
@BraianF
Copy link

BraianF commented Feb 27, 2025

It happens because the "entity" field is read only on admin.py file.

@coufxr
Copy link
Author

coufxr commented Mar 11, 2025

Thanks, after rewriting the get_readonly_fields function in admin.py, I can use it now!

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

2 participants