crccheck / django-object-actions

A Django app for easily adding object tools in the Django admin
https://pypi.org/project/django-object-actions/
Apache License 2.0
681 stars 82 forks source link

Naming things #44

Open crccheck opened 8 years ago

crccheck commented 8 years ago

I could have sworn I had a naming things issue before. I'm not that happy with some of the name choices I made.

This is really the only thing blocking a 1.0 release

model admin attribute, objectactions

The scope of the project is expanding a bit. The Django admin has conventions for standard admin views. The docs show there's the:

Each of those could potentially have their own sets of actions. If we re-use the existing names, we end up with add_actions, change_actions, changelist_actions, delete_actions, and history_actions.

template context variable: objectactions

For every view, it'd be nice to have the same context variable. We don't need to differentiate between each kind.

gatsinski commented 6 years ago

I just found this project. It works as expected and I'm going to use it in a lot of places. Thanks a lot. I'm also willing to help but I have some difficulties understanding the checklist.

If the name in INSTALLED_APPS remains the same, the checkbox should be checked, right?

Renaming the takes_instance_or_queryset decorator to just to_queryset seems like an easy task and I can do it if this is all that needs to be done.

About the objectactions context variable I have some suggestions: custom_actions, actions_list, admin_actions and custom_admin_actions.

Actually, I don't think objectactions is that bad, except for the missing underscore. The first time I read it like objections. Maybe object_actions will be better.

DjangoObjectActions can be renamed to CustomActionsMixin or CustomObjectActionsMixin. The same goes with BaseDjangoObjectActions.

About the docs, change actions sounds nice.