diff --git a/beat/web/navigation/admin.py b/beat/web/navigation/admin.py index 307fb708da01834becb86d69f68b467fd8322dc2..138f581d4e23b47fdf12111de7c09dc601a66a09 100644 --- a/beat/web/navigation/admin.py +++ b/beat/web/navigation/admin.py @@ -33,6 +33,7 @@ from .models import Agreement from ..accounts.models import AccountSettings from ..accounts.models import SupervisionTrack from ..accounts.models import Profile +from ..accounts.models import TemporaryUrl #---------------------------------------------------------- @@ -177,3 +178,26 @@ class ProfileAdmin(admin.ModelAdmin): ) admin.site.register(Profile, ProfileAdmin) + + +#---------------------------------------------------------- + + +class TemporaryUrlAdmin(admin.ModelAdmin): + + def supervision_key(self, obj): + return obj.supervision_track.supervision_key + + list_display = ( + 'url_hash', + 'expires', + 'supervision_track', + 'supervision_key', + 'status', + ) + + ordering = ( + 'expires', + ) + +admin.site.register(TemporaryUrl, TemporaryUrlAdmin)