Unverified Commit 2fb16ed0 authored by Gautier D's avatar Gautier D Committed by Florent Chehab
Browse files

feat(backend): register views in custom admin site

parent 87b69d2a
from django.contrib import admin
from base_app.admin import admin_site
from reversion_compare.admin import CompareVersionAdmin
from backend_app.models.abstract.versionedEssentialModule import (
......@@ -73,8 +73,8 @@ VERSIONED_MODELS = filter(lambda m: issubclass(m, VersionedEssentialModule), ALL
for Model in CLASSIC_MODELS:
# Register the model in the admin in a standard way
admin.site.register(Model)
admin_site.register(Model)
for Model in VERSIONED_MODELS:
# Register the model in the admin with versioning
admin.site.register(Model, CompareVersionAdmin)
admin_site.register(Model, CompareVersionAdmin)
......@@ -212,7 +212,9 @@ class UnlinkedUtcPartners(ViewSet):
def list(self, request):
partners = Partner.objects.filter(university=None)
return Response(list(map(lambda partner: partner.univ_name, partners)))
return Response(
list(map(lambda partner: (partner.utc_id, partner.univ_name), partners))
)
class UpdateStudentExchangesViewSet(ViewSet):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment