Skip to content

Add a custom SiteAdmin and add id to list display#1601

Merged
MyPyDavid merged 3 commits into
2.4.5/releasefrom
2.4.5/fix/add-id-to-site-admin
May 11, 2026
Merged

Add a custom SiteAdmin and add id to list display#1601
MyPyDavid merged 3 commits into
2.4.5/releasefrom
2.4.5/fix/add-id-to-site-admin

Conversation

@MyPyDavid
Copy link
Copy Markdown
Member

@MyPyDavid MyPyDavid commented May 7, 2026

Description

Related issue: None
Adds a CustomSiteAdmin

Motivation and Context

We have many Sites in the instance and it gets hard to see which SITE_ID they have..

Discussion

  • can this go in rdmo.core or should go to the rdmo-app?
  • add more features like a project count so the display table?

Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
@MyPyDavid MyPyDavid added this to the RDMO 2.4.5 milestone May 7, 2026
@MyPyDavid MyPyDavid requested a review from jochenklar May 7, 2026 07:46
@MyPyDavid MyPyDavid self-assigned this May 7, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented May 7, 2026

Coverage Status

Coverage is 94.905%2.4.5/fix/add-id-to-site-admin into 2.4.5/release. No base build found for 2.4.5/release.

Comment thread rdmo/core/admin.py Outdated
@admin.register(Site)
class CustomSiteAdmin(SiteAdmin):
list_display = ('id', 'domain', 'name')
search_fields = ('domain', 'name')
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

click link to domain, and import DjangoSiteAdmin

Comment thread rdmo/core/admin.py Outdated
@@ -1,8 +1,21 @@
from django import forms
from django.contrib import admin
from django.contrib.sites.admin import SiteAdmin
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

import DjangoSiteAdmin

MyPyDavid added 2 commits May 8, 2026 07:51
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Copy link
Copy Markdown
Member

@jochenklar jochenklar left a comment

Choose a reason for hiding this comment

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

Nice! We could put the ID at the end of the table, but this is up to you.

@MyPyDavid MyPyDavid changed the title Add CustomSiteAdmin and add id to list display Add a custom SiteAdmin and add id to list display May 11, 2026
@MyPyDavid MyPyDavid merged commit 6f33170 into 2.4.5/release May 11, 2026
18 checks passed
@MyPyDavid MyPyDavid deleted the 2.4.5/fix/add-id-to-site-admin branch May 11, 2026 12:17
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.

3 participants