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

Use custom admin list_display field. #24

Open
pahaz opened this issue Sep 2, 2014 · 1 comment
Open

Use custom admin list_display field. #24

pahaz opened this issue Sep 2, 2014 · 1 comment

Comments

@pahaz
Copy link

pahaz commented Sep 2, 2014

I think need use list_display without template usage.

class Admin(DjangoObjectActions, ...):
    list_display = ( ... , 'object_actions')

class DjangoObjectActions(...)
   def object_actions(self, obj):
       for x in objectactions:
           ...
       return "HTML WITH BUTTONS"

   object_actions.allow_tags = True

It is may be more simple, and not require work with templates. What do you think about it?

And it is fix grappelli issuse, and all issuse connected to custom templates.

@crccheck
Copy link
Owner

crccheck commented Sep 2, 2014

I think I get what you're asking. Seems like a good feature to me. Some smells I can think of:

  • It would make the "actions should be post requests" people unhappy POST actions #16
  • reinforce some other ugly code
  • more code (boo code)

But I think since it would be opt-in, and might simplify code elsewhere, it's worth pursing.

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

No branches or pull requests

2 participants