Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete link in admin change_form not getting adminoptions #64

Open
florianm opened this issue Oct 17, 2016 · 4 comments
Open

Delete link in admin change_form not getting adminoptions #64

florianm opened this issue Oct 17, 2016 · 4 comments

Comments

@florianm
Copy link

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.

@rtindru
Copy link

rtindru commented Feb 22, 2017

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?

@florianm
Copy link
Author

@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.

@rtindru
Copy link

rtindru commented Mar 7, 2017

@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?

@florianm
Copy link
Author

florianm commented Mar 7, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants