Open rob4226 opened 3 years ago
Never mind, I see it was fixed in commit 2b3357b 8 months ago with the below:
But the djoser
package on PyPi is outdated and has:
def perform_update(self, serializer):
super().perform_update(serializer)
user = serializer.instance
# should we send activation email after update?
if settings.SEND_ACTIVATION_EMAIL:
context = {"user": user}
to = [get_user_email(user)]
settings.EMAIL.activation(self.request, context).send(to)
I just installed from the git repo instead, so that should take care of it:
pipenv install git+https://github.com/sunscrapers/djoser.git#egg=djoser
After changes introduced by @dekoza 4 days ago, it is impossible to install djoser using the git+https://github.com/sunscrapers/djoser.git#egg=djoser
and on pypi
the problem still persists with the activation emails...
Upon installing i get the error that I wrote the comment about https://github.com/sunscrapers/djoser/commit/c62371e3f9a8bbad2eaf55ffd0efad6eb6c02f26#r64007511
Thanks for the heads up.
Is there any reason the pypi package doesn't get updated? Last release is from Oct-2020.
dunno - Need to ask maintainers about this ASAP @dekoza is the first that comes to mind
I checked my pipenv lock file on a production site and found I have been using commit b648b07dc2da7dab4c00c1c39af3d6ec53f58eb6 so I changed the install url to https://github.com/sunscrapers/djoser.git@b648b07dc2da7dab4c00c1c39af3d6ec53f58eb6 which got my virtual env install working again until hopefully the PyPi package gets updated.
@rob4226 well I can't update using your link ~~but git+https://github.com/sunscrapers/djoser.git@aa056350c8444a073666cce9291f7fcfef62822a works for me
The commit you linked is not merged - you should use aa05635
EDIT:
Unfortunately commit aa05635 doesn't include the changes with activation e-mail so its safer to use ede06f2 I think - just before @dekoza introduced the poetry changes
Are you sure? It looks like b648b07 is merged but yeah it would prob be better anyway to use the latest commit before the poetry thing. I'll try ede06f2
For me b648b07 caused the same error...
Hi,
I am using Djoser with the SimpleJWT plugin and for some reason my users get constant user Activation emails from my server even after they have activated in the past. If they click on the activation link again it just says they have already activated.
Does it have something to do with updating a
User
that triggers this email again? I would think the only time an activation email should be sent out is when a user is created and is not active. Any ideas on why this would be happening? Thanks!Djoser settings: