Commit 7e26f2a6 authored by Fabien  MAREUIL's avatar Fabien MAREUIL
Browse files

cavity name filter in distances admin interface

parent d0a173c0
Pipeline #53117 failed with stages
in 16 minutes and 33 seconds
......@@ -179,6 +179,7 @@ class CavityAdmin(admin.ModelAdmin):
class DistanceAdmin(admin.ModelAdmin):
list_display = ("similiarity_between", "distance")
search_fields = ("cavity1__full_name", "cavity2__full_name")
def similiarity_between(self, obj):
return "{} and {}".format(obj.cavity1.full_name, obj.cavity2.full_name)
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