Remove admin view_on_site workaround
Fixed in Django 4.0.4
This commit is contained in:
parent
dfd39bf920
commit
d903447bf1
1 changed files with 0 additions and 10 deletions
|
|
@ -91,11 +91,6 @@ class GovernmentPlanAdmin(admin.ModelAdmin):
|
||||||
)
|
)
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
def view_on_site(self, obj):
|
|
||||||
# Avoid Django's redirect through normal admin
|
|
||||||
# TODO: remove on https://github.com/django/django/pull/15526
|
|
||||||
return obj.get_absolute_url()
|
|
||||||
|
|
||||||
def get_actions(self, request):
|
def get_actions(self, request):
|
||||||
actions = super().get_actions(request)
|
actions = super().get_actions(request)
|
||||||
if not has_limited_access(request.user):
|
if not has_limited_access(request.user):
|
||||||
|
|
@ -279,11 +274,6 @@ class GovernmentPlanUpdateAdmin(admin.ModelAdmin):
|
||||||
qs = qs.filter(plan__in=get_allowed_plans(request))
|
qs = qs.filter(plan__in=get_allowed_plans(request))
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
def view_on_site(self, obj):
|
|
||||||
# Avoid Django's redirect through normal admin
|
|
||||||
# TODO: remove on https://github.com/django/django/pull/15526
|
|
||||||
return obj.get_absolute_url()
|
|
||||||
|
|
||||||
def save_model(self, request, obj, form, change):
|
def save_model(self, request, obj, form, change):
|
||||||
limited = has_limited_access(request.user)
|
limited = has_limited_access(request.user)
|
||||||
if not change and limited:
|
if not change and limited:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue