-
Notifications
You must be signed in to change notification settings - Fork 83
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
Resend activation link #100
Comments
Hi @14MR, would moving the code for sending the" register user" notification to a separate function https://github.com/apragacz/django-rest-registration/pull/101/files You would only need to provide |
It looks like I have to have my user's |
@14MR It doesn't matter whether the request is a Django Request object or DRF Request proxy object, in both cases this method ( So in the case you mentioned earlier (re-sending the e-mail to users from the admin), you could write simple admin action like that: from django.contrib.auth.admin import UserAdmin
from rest_registration.api.views.register import send_register_verification_notification
from myapp.models import User
def send_verification(modeladmin, request, queryset):
for user in queryset:
send_register_verification_notification(request, user)
send_verification.short_description = "Send verification e-mail"
class MyUserAdmin(UserAdmin):
# ...
actions = UserAdmin.actions + [send_verification]
admin.site.register(User, MyUserAdmin) The code above is untested and needs refinement, but hopefully you get the idea; see the docs about admin actions for more: You could consider refining the code by sending the verification only to the unverified users (not all selected) but that's up to you. I think I will move the If you have any other questions please let me know, in other case I will merge the change in the PR above soon (in few days). |
In regard to issue #100 Changes: * Create `send_register_verification_email_notification` in `rest_registration.utils.verification_notifications` module * Move `RegisterSigner` to `rest_registration.signers.register` module
In regard to issue #100 Changes: * Create `send_register_verification_email_notification` in `rest_registration.utils.verification_notifications` module * Move `RegisterSigner` to `rest_registration.signers.register` module
In regard to issue #100 Changes: * Create `send_register_verification_email_notification` in `rest_registration.utils.verification_notifications` module * Move `RegisterSigner` to `rest_registration.signers.register` module
@14MR |
Checklist
Is your feature request related to a problem? Please describe.
(Provide a clear and concise description of what the problem is.
For example: "I'm always frustrated when ...")
Sometimes, due to some email transport reasons, we need to send again a registration email. But just calling
send_verification_notification()
function with the same parameters didn't work in this case.Describe the solution you'd like
(Provide a clear and concise description of what you want to happen)
I want to have an ability to resend registration email manually using a function or admin panel action
P.S. I would like to get some help with an idea of how to implement this so I can do it myself and probably provide a PR. Thank you
The text was updated successfully, but these errors were encountered: