23
24# Custom RegistrationSerializer; with first and last name + possible future changes.
25# From https://github.com/iMerica/dj-rest-auth/blob/master/dj_rest_auth/registration/serializers.py#L197
26class RegisterSerializer(serializers.Serializer): 27 first_name = serializers.CharField(max_length=30, required=True, write_only=True)
28 last_name = serializers.CharField(max_length=30, required=True, write_only=True)
29 email = serializers.EmailField(required=allauth_settings.EMAIL_REQUIRED)
16"""
17
18# TODO Rename this here and in `assign_matches_this_week`
19def assign():20 # AVAILABLE
21 SocialProfile.objects.filter(available_always_off=False).update(
22 available_this_week=True
19"""
20
21# substantial ML functionality lifted from connectdome's existing codebase and modified
22def transform_variables_profile(social_profile): 23 """Transforms the variables so that they work well on knn for 1:1"""
24 # idea_status
25 idea = 0
5from allauth.account.adapter import DefaultAccountAdapter
6
7# https://github.com/iMerica/dj-rest-auth/issues/17#issuecomment-606161091
8class AccountAdapter(DefaultAccountAdapter): 9 @staticmethod
10 def get_email_confirmation_url(request, emailconfirmation):
11 site = get_current_site(request)
Two blank lines are expected between functions and classes.