mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-16 22:09:25 +08:00
Improved user registration serializer
This commit is contained in:
parent
bf9ed11a9e
commit
3748b4d2c8
2 changed files with 3 additions and 1 deletions
|
@ -83,6 +83,8 @@ class UserRegistrationSerializer(serializers.ModelSerializer):
|
|||
student_id_number = serializers.CharField(required=True)
|
||||
password = serializers.CharField(
|
||||
write_only=True, style={'input_type': 'password', 'placeholder': 'Password'})
|
||||
subjects = serializers.SlugRelatedField(
|
||||
many=True, slug_field='name', queryset=Subject.objects.all(), required=False, allow_null=True)
|
||||
|
||||
class Meta:
|
||||
model = CustomUser # Use your custom user model here
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<p>{% blocktrans %}You're receiving this email because you need to finish activation process on {{ site_name }}.{% endblocktrans %}</p>
|
||||
|
||||
<p>{% trans "Please go to the following page to activate your account in-app:" %}</p>
|
||||
<p><a href="{{ domain }}://{{ url|safe }}">{{ domain }}://--/{{ url|safe }}</a></p>
|
||||
<p><a href="{{domain}}://{{url}}">{{ domain }}://{{url}}</a></p>
|
||||
|
||||
<p>{% blocktrans %}Many thanks from the {{ site_name }} team{% endblocktrans %}</p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue