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

Object action not showing in admin change form #59

Open
PabloVallejo opened this issue Mar 7, 2016 · 3 comments
Open

Object action not showing in admin change form #59

PabloVallejo opened this issue Mar 7, 2016 · 3 comments

Comments

@PabloVallejo
Copy link

Thanks for creating this useful package. I followed the setup process however the actions are not showing in admin.

I'm using Python 3.5, Django 1.9.2 and Flat Admin Theme.

This is my implementation:

@admin.register(Entry)
class ProcedureEntryAdmin(DjangoObjectActions, admin.ModelAdmin):
    # ...

    def publish_this(self, request, obj):
        obj.publish()

    publish_this.label = "Publish"
    change_actions = ['publish_this' ]

Thanks!

@crccheck
Copy link
Owner

crccheck commented Mar 8, 2016

I checked my demo admin and it was working for me there. So I guess it has something to do with the Flat Admin Theme. Here's the relevant part of the readme:

  1. If you provide your own custom change_form.html, you'll also need to
    manually copy in the relevant bits of our change form <https://github.com/crccheck/django-object-actions/blob/master/django_obj ect_actions/templates/django_object_actions/change_form.html>_. You can also
    use from django_object_actions import BaseDjangoObjectActions instead.

https://github.com/crccheck/django-object-actions#limitations

@dboczek
Copy link

dboczek commented Jul 20, 2016

FYI I had the same problem and it was caused by older version of django-object-actions which did not use change_actions attribute but objectactions.

@crccheck
Copy link
Owner

Good point. I was deciding between doing a more graceful deprecation and just changing it. Since it's below version 1.0, I just changed it to minimize the amount of code. But seeing that is making me think about doing it more gracefully in the future.

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

3 participants