gadventures / django-fsm-admin

Mixin and template tags to integrate django-fsm transitions into the django admin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delete link in admin change_form not getting adminoptions

florianm opened this issue · comments

Django==1.10.2
django-grappelli==2.8.2
django-fsm==2.4.0
django-fsm-admin==1.2.3
django-fsm-log==1.3.0

It appears that the fsm_submit_line_grappelli template is not receiving any context, and therefore fails to build the correct "delete" URL.

I've mentioned this over at sehmaschine/django-grappelli#783 - not sure where the problem lies yet.

I am having the exact same issue. Django admin change form now has a /change bit at the end as of Django 1.9. Therefore the delete button, which has a simple href="/delete" now constructs a URL /admin/xyz/pk/change/delete (which 404s) instead of /admin/xyz/pk/delete. Surprised to see that this issue is still open. @florianm Did you find a workaround/fix?

@rtindru not yet - since only a handful of trained data admins touch the data and we also very rarely have to delete records, we're getting away with manually fixing the URL from /change/delete to delete.

@florianm How are you doing this manual fix? Custom JS on all the admin pages or editing the base template; adding an absolute URL instead of a relative url or a url redirect in your urls.py?

@rtindru worse - deleting the /change from the URL. We have to delete a record so rarely that this is the most efficient approach for us.