Compare commits

..

6 Commits

View File

@ -1,3 +1,5 @@
from dataclasses import dataclass
from django.contrib import admin
from django.contrib.humanize.templatetags.humanize import naturaltime
from django.http import HttpRequest
@ -231,8 +233,15 @@ class EventAdmin(DjangoObjectActions, admin.ModelAdmin):
]
class Media:
@dataclass(frozen=True)
class LazyViteAssetUrl(str):
asset: str
def __str__(self) -> str:
return vite_asset_url(self.asset)
js = [
vite_asset_url(
LazyViteAssetUrl(
"membershipworks/js/event_meeting_time_admin_helper.entry.ts"
)
]
@ -275,7 +284,6 @@ class EventAdmin(DjangoObjectActions, admin.ModelAdmin):
ordering="meeting_times_match_event",
)
def meeting_times_match_event(self, obj) -> bool:
print(obj.meeting_times_match_event)
return obj.meeting_times_match_event
@admin.display(description="MembershipWorks links")