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

Add support for custom object representations in the admin interface with __admin_repr__ and __admin_select2_repr__ #152

Merged
merged 7 commits into from
Apr 9, 2023

Conversation

jowilf
Copy link
Owner

@jowilf jowilf commented Apr 1, 2023

It was already possible, but required to override ModelView.repr and ModelView.select2_result

…ace by reading __admin_repr__ and __admin_html_repr__ from the object.
@github-actions
Copy link

github-actions bot commented Apr 1, 2023

@github-actions github-actions bot temporarily deployed to pull request April 1, 2023 21:11 Inactive
@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f52f23d) 100.00% compared to head (ec86807) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #152   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           64        64           
  Lines         4601      4641   +40     
=========================================
+ Hits          4601      4641   +40     
Impacted Files Coverage Δ
starlette_admin/views.py 100.00% <100.00%> (ø)
tests/test_views.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jowilf jowilf changed the title Add support for custom object representations in the admin interface with __admin_repr__ and __admin_html_repr__ Add support for custom object representations in the admin interface with __admin_repr__ and __admin_select2_repr__ Apr 1, 2023
@github-actions github-actions bot temporarily deployed to pull request April 1, 2023 21:20 Inactive
@jowilf jowilf added this to the Release 0.8.0 milestone Apr 1, 2023
@github-actions github-actions bot temporarily deployed to pull request April 2, 2023 01:34 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 2, 2023 01:50 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 3, 2023 04:04 Inactive
…tation

# Conflicts:
#	starlette_admin/views.py
@github-actions github-actions bot temporarily deployed to pull request April 8, 2023 22:09 Inactive
@jowilf jowilf merged commit 01c5322 into main Apr 9, 2023
8 checks passed
@jowilf jowilf deleted the admin-object-representation branch April 9, 2023 05:54
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

Successfully merging this pull request may close these issues.

None yet

1 participant