Skip to content
Snippets Groups Projects
Commit 560d87ef authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[navigation][admin] TemporaryUrlAdmin admin view integration

parent 96320785
No related branches found
No related tags found
1 merge request!328Improve automatic emails with temporary urls
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment