burke-software / django-mass-edit

Make bulk changes in the Django admin interface
156 stars 68 forks source link

KeyError 'has_view_permission' during template rendering #83

Closed fimtrey closed 4 years ago

fimtrey commented 4 years ago

Django version: 2.1.4 Python Version: 3.6.0 KeyError: 'has_view_permission' is missing "In template .../django/contrib/admin/templates/admin/base.html, error at line 58"

Django 2.1 added a view permission to the default permissions.

PetrDlouhy commented 4 years ago

@fim13 Are you sure, you use newest PyPI version 3.2.0? I use django-mass-edit with Django 2.2.9 without any problem. Please describe, what you have done before getting this error.

fimtrey commented 4 years ago

@PetrDlouhy I do, following my Pipfile.lock:

   "django-mass-edit": {
          "hashes": [
                      ...
          ],
          "index": "pypi",
          "version": "==3.2.0"
      },
fimtrey commented 4 years ago

I added 'has_view_permission' to context and now I get 'has_editable_inline_admin_formsets' missing – something seems strange.

fimtrey commented 4 years ago

Found the problem, DjangoObjectActions from django_object_actions sets 'change_form_template' too, which isn't compatible, any ideas besides not using django_object_actions.

danialmalik commented 2 years ago

@fim13 were you able to find a workaround? I am facing the same issue. I have change_form_template for some of my model admins and am getting the same error.