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

✨ [#315] added extra version and uuid fields in admin #393

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

bart-maykin
Copy link
Contributor

Fixes #315

Changes

Added some version and uuid fields in the admin panel.

@bart-maykin bart-maykin force-pushed the feature/315-extra-admin-fields branch 2 times, most recently from 4afd616 to d296fc6 Compare April 18, 2024 08:55
@bart-maykin bart-maykin requested a review from annashamray April 23, 2024 10:54
@annashamray annashamray requested a review from SonnyBA April 23, 2024 12:01
@@ -40,6 +40,17 @@ def url(self):
# zds_client.get_operation_url() can be used here but it increases HTTP overhead
return f"{self.service.api_root}objecttypes/{self.uuid}"

@property
def version(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a version, it's rather the last available version. But the thing is that we specify the objecttype version in the object data, Objecttype model has only a link to objecttype itself.
@joeribekker Do we really want in the list admin view to perform a lot of HTTP requests to get the last version?

Even if you want to go this was, I think it's more useful to show the list of all versions available, not the last one.
And if you want to see them in the list view, it's better to perform one list request to Objecttypes API instead of a lot of individual detail requests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I specced this ticket too easily. And we dont want to do many http calls here. I will respec the ticket.

src/objects/token/admin.py Outdated Show resolved Hide resolved
src/objects/token/admin.py Outdated Show resolved Hide resolved
src/objects/token/admin.py Show resolved Hide resolved
src/objects/token/admin.py Outdated Show resolved Hide resolved
src/objects/core/models.py Outdated Show resolved Hide resolved
@bart-maykin bart-maykin requested a review from annashamray April 30, 2024 08:37
@bart-maykin bart-maykin force-pushed the feature/315-extra-admin-fields branch from 2207eab to 01ac34a Compare April 30, 2024 12:28
src/objects/token/admin.py Outdated Show resolved Hide resolved
src/objects/token/admin.py Outdated Show resolved Hide resolved
src/objects/token/admin.py Outdated Show resolved Hide resolved
@bart-maykin bart-maykin force-pushed the feature/315-extra-admin-fields branch from 01ac34a to c3057d2 Compare May 3, 2024 13:44
@bart-maykin bart-maykin requested a review from annashamray May 10, 2024 09:49
Copy link
Collaborator

@annashamray annashamray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase on master and resolve the conflcts

src/objects/token/admin.py Outdated Show resolved Hide resolved
@bart-maykin bart-maykin force-pushed the feature/315-extra-admin-fields branch from c3057d2 to 517c8d4 Compare May 14, 2024 07:20
@bart-maykin bart-maykin requested a review from annashamray May 14, 2024 07:20
Copy link
Collaborator

@annashamray annashamray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove get_uuid from readonly fields in PermissionAdmin. if it's not shown on the detail page,

@bart-maykin bart-maykin force-pushed the feature/315-extra-admin-fields branch from 517c8d4 to 491d1ab Compare May 22, 2024 10:16
@bart-maykin bart-maykin requested a review from annashamray May 22, 2024 10:16
@joeribekker joeribekker requested a review from SonnyBA May 28, 2024 08:38
Copy link
Collaborator

@annashamray annashamray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bart-maykin bart-maykin merged commit b4ebbeb into master Jun 4, 2024
11 checks passed
@bart-maykin bart-maykin deleted the feature/315-extra-admin-fields branch June 4, 2024 08:36
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.

As admin I want to see the UUID and version of an objecttype
4 participants