diff --git a/projects/admin.py b/projects/admin.py index 5e3b532c..0b0c804a 100644 --- a/projects/admin.py +++ b/projects/admin.py @@ -1,5 +1,6 @@ from django.contrib import admin from django.utils.html import format_html +from django.urls import reverse from allocations.models import Allocation from projects.models import ( @@ -218,7 +219,24 @@ class ProjectAdmin(admin.ModelAdmin): list_display = ["charge_code", "pi", "nickname", "title"] search_fields = ["charge_code", "pi__username", "pi__email", "nickname", "title"] list_filter = ["tag"] - readonly_fields = ["charge_code", "automatically_tagged", "join_url"] + readonly_fields = [ + "charge_code_link", + "automatically_tagged", + "join_url", + ] + fields = [ + "charge_code_link", + "title", + "nickname", + "description", + "pi", + "join_url", + ] + + def charge_code_link(self, obj): + return format_html( + f'{obj.charge_code}' + ) def join_url(self, obj): return format_html(