feat: django-rest-framework + Person/Email API#8256
Merged
Conversation
* chore: djangorestframework -> requirements.txt
* chore: auth/perm/schema classes for drf
* chore: settings for drf and friends
* chore: comment that api/serializer.py is not DRF
* feat: URL router for DRF
* feat: simple api/v3/person/{id} endpoint
* fix: actually working demo endpoint
* chore: no auth for PersonViewSet
* ci: params in ci-run-tests.yml
* Revert "ci: params in ci-run-tests.yml"
This reverts commit 03808dd.
* feat: email addresses for person API
* feat: email update api (WIP)
* fix: working Email API endpoint
* chore: annotate address format in api schema
* chore: api adjustments
* feat: expose SpectacularAPIView
At least for now...
* chore: better schema_path_prefix
* feat: permissions for DRF API
* refactor: use permissions classes
* refactor: extract NewEmailForm validation for reuse
* refactor: ietfauth.validators module
* refactor: send new email conf req via helper
* feat: API call to issue new address request
* chore: move datatracker DRF api to /api/core/
* fix: unused import
* fix: lint
* refactor: better drf URL naming * test: test person-detail view * test: permissions * test: add_email tests + stubs * test: test email update * test: test 404 vs 403 * fix: fix permissions * test: test email partial update * test: assert we have a nonexistent PK
rjsparks
previously approved these changes
Nov 27, 2024
rjsparks
reviewed
Nov 27, 2024
| def prevent_at_symbol(name): | ||
| if "@" in name: | ||
| raise forms.ValidationError( | ||
| "Please fill in name - this looks like an email address (@ is not allowed in names)." |
Member
There was a problem hiding this comment.
This, of course, is baiting the real world
Member
Author
There was a problem hiding this comment.
We could do away with the check - not sure what, if any, ramifications there'd be.
Member
There was a problem hiding this comment.
No - at the moment the check is useful.
rjsparks
approved these changes
Nov 27, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Django Rest Framework to the datatracker and adds API endpoints that allow email address management.