Browse Source

fixed issue with admin routing when downloading results

Elena Paraschiv 8 months ago
parent
commit
5591647dad
1 changed files with 2 additions and 2 deletions
  1. 2 2
      llmeval/commons/admin.py

+ 2 - 2
llmeval/commons/admin.py

@@ -79,7 +79,7 @@ class EvalConfigAdmin(admin.ModelAdmin):
 
     @admin.display(description='Link')
     def link(self, obj):
-        return mark_safe(f'<a href="/admin/commons/evalconfig/{obj.id}/config_download_results/">Download Results</a>')
+        return mark_safe(f'<a href="/commons/evalconfig/{obj.id}/config_download_results/">Download Results</a>')
     
     def get_urls(self):
         urls = super().get_urls()
@@ -97,7 +97,7 @@ class EvalSessionAdmin(admin.ModelAdmin):
 
     @admin.display(description='Link')
     def link(self, obj):
-        return mark_safe(f'<a href="/admin/commons/evalsession/{obj.id}/eval_download_results/">Download Results</a>')
+        return mark_safe(f'<a href="/commons/evalsession/{obj.id}/eval_download_results/">Download Results</a>')
     
     def get_urls(self):
         urls = super().get_urls()