mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 04:49:21 +02:00
See #187: API logic for password reset
This commit is contained in:
parent
929b50183a
commit
22f0b1a2d8
4 changed files with 41 additions and 7 deletions
|
@ -1,5 +1,7 @@
|
|||
from rest_framework import serializers
|
||||
from django.conf import settings
|
||||
|
||||
from rest_framework import serializers
|
||||
from rest_auth.serializers import PasswordResetSerializer as PRS
|
||||
from funkwhale_api.activity import serializers as activity_serializers
|
||||
|
||||
from . import models
|
||||
|
@ -63,3 +65,12 @@ class UserReadSerializer(serializers.ModelSerializer):
|
|||
'status': o.has_perm(internal_codename)
|
||||
}
|
||||
return perms
|
||||
|
||||
|
||||
class PasswordResetSerializer(PRS):
|
||||
def get_email_options(self):
|
||||
return {
|
||||
'extra_email_context': {
|
||||
'funkwhale_url': settings.FUNKWHALE_URL
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue