Closed leunis closed 2 years ago
Hi, I changed back to django 2.2.18. No problem here. So I guess something with has_permissions has changed in django 3.x
Django 3.x modified django/contrib/admin/options.py at line 603:
if not inline.has_add_permission(request, obj):
Updating all the authemail admin.py has_add_permissions
from:
def has_add_permission(self, request):
return False
to:
def has_add_permission(self, request, obj=None):
return False
Fixes it for me on 3.x.
Django 3.x modified django/contrib/admin/options.py at line 603:
if not inline.has_add_permission(request, obj):
Updating all the authemail admin.py
has_add_permissions
from:def has_add_permission(self, request): return False
to:
def has_add_permission(self, request, obj=None): return False
Fixes it for me on 3.x.
Thanks! This worked fine.
I am pretty sure that by giving it a default (obj=None
), it will work fine with either version.
Thanks @DeeeeLAN, it worked fine for me.
@celiao , any plan on merging the PR #41 ?
Thanks, it worked me too! Please merge PR #41 .
@celiao , would you mind having other mainteners joining the project, if you don't have time to review/merge PR's?
I'm happy to help!
Worked for me too. Bumping this.
Closed by #41
I am getting this error when I click on a user in the admin.
'TypeError at /admin/core/user/1/change/ has_add_permission() takes 2 positional arguments but 3 were given'
I am a newbee in programming and in Django but I found on the internet that is has to to with inlines. So I have overwritten inlines in my custom EmailUserAdmin like so
Of course I am missing some features now but the error is gone. How should I Solve this properly. This are my packages: