Skip to content
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

Feature/registration #671

Merged
merged 33 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
524fc83
add phonenumber field
Sep 13, 2023
f7bb910
first draft of email and phone number backend
Sep 14, 2023
9090bc7
finalize adding phone number and mail to user
Sep 14, 2023
e473bf4
fix eslint errors
Sep 14, 2023
3bb6cb5
fix yapf
Sep 21, 2023
31b9170
add email migration
Sep 21, 2023
fa831ca
Merge branch 'master' into feature/registration
magsyg Sep 21, 2023
1fd8138
fix tests and pytz
Sep 21, 2023
83cefd6
Merge branch 'master' into feature/registration
magsyg Sep 21, 2023
9155252
fix tests and pytz
Sep 21, 2023
5f716bc
fix merge
Sep 21, 2023
1827644
Merge branch 'master' into feature/registration
magsyg Sep 26, 2023
7880f92
fix migrations with master
Sep 28, 2023
317f8ee
fix regex and remove pytz
Sep 28, 2023
04506d0
add constant
Nov 2, 2023
cf92828
fix merge
Nov 2, 2023
a96316e
lol
Nov 2, 2023
92d2211
clean migrations
Nov 2, 2023
e4952b3
Merge branch 'master' into feature/registration
magsyg Nov 16, 2023
f54dd1f
fix const name for phonenumber
Nov 16, 2023
4330966
fix yapf for files i just merged
Nov 16, 2023
2afade9
small fixes
Dec 16, 2023
ac928b0
fix merge
Dec 16, 2023
28b6845
fix pipfilelock
Dec 16, 2023
ed59384
fix migrations
Dec 17, 2023
f026fd4
add migrations
Dec 17, 2023
bac1f9e
fix bandit
Dec 17, 2023
1b672f4
remove blacklisted bandit method
Dec 17, 2023
8039984
fix
Dec 17, 2023
326f3d5
Delete Pipfile
magsyg Dec 17, 2023
83b0355
Merge branch 'master' into feature/registration
magsyg Dec 17, 2023
1484dc3
Merge branch 'master' into feature/registration
magsyg Dec 19, 2023
df0cf9e
final commit for email and phonenumber
Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion backend/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ debugpy = "*"
gunicorn = "*"
django-admin-autocomplete-filter = "*"
django-notifications-hq = "*"
pytz = "*"

[dev-packages]
yapf = "*"
Expand Down
2 changes: 1 addition & 1 deletion backend/samfundet/models/utils/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
kwargs['max_length'] = 15
self.validators = [
RegexValidator(
regex=r'^([\+]?[(]?[0-9]{3}[)]?[-\s\.]?)?[0-9]{3}[-\s\.]?[0-9]{4,6}$',
regex=r'^(\+?\(?\d{3}\)?[-\s\.]?)?\d{3}[-\s\.]?\d{4,6}$',
message='Enter a valid phonenumber',
),
]
Expand Down
2 changes: 1 addition & 1 deletion backend/samfundet/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class RegisterSerializer(serializers.Serializer):
email = serializers.EmailField(label='Email', write_only=True)
phone_number = serializers.RegexField(
label='Phonenumber',
regex=r'^([\+]?[(]?[0-9]{3}[)]?[-\s\.]?)?[0-9]{3}[-\s\.]?[0-9]{4,6}$',
regex=r'^(\+?\(?\d{3}\)?[-\s\.]?)?\d{3}[-\s\.]?\d{4,6}$',
emilte marked this conversation as resolved.
Show resolved Hide resolved
write_only=True,
)
firstname = serializers.CharField(label='First name', write_only=True)
Expand Down
Loading