-
Notifications
You must be signed in to change notification settings - Fork 1
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
Serializers #55
Open
RaquelGarcia999
wants to merge
38
commits into
master
Choose a base branch
from
Serializers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Serializers #55
Conversation
This file contains 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
It has the code from the models.py we've been using rather than the old models.py
…erializers We need to copy these over
The PersonSerializer was a dummy to help create a temporary json– this serializer will actually be used when a user requests info about a Person
document.recipients clashing with document.authors
When it was below the '' Url, it wouldn't load because the '' matched everything
Now it accepts a query, extracts the full_name from it, and returns a person with that last name
We no longer need this
No need for imports that aren't used
It may throw an error if I don't do this
Not sure if list_edges and get_network_data are ok to delete yet
Going to add more test cases soon; this is the first. We also tried adding a test case for serializer but then commented it out because it wasn't working.
They correctly test whether views will return "person not found" dummy person instance if full_name requested not in database; also tests if returns correctly serialized person if the full_name IS in the database
Temporary changes in order to merge
Changing Person to DjangoPerson Some changes are temporary to allow merging.
DjangoPerson is the model we're using now (name changed), so just updating the code to reflect that
pasting back in what we deleted in order to merge correctly
Forgot to add it back; now it's back!
… into Serializers
Everything is working!!!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Serializers:
Defines the serializers that will be used in views to return information about a queried person to the user.
Views:
Views that define API endpoints for the site.
Contains get_person_info, which is what allows a user to request info about a person (using their full name attribute) and receive a serialized version of that information, including first/middle/last name, most likely organization, number of occurrences in the database, aliases, and positions.
If the user requests information about a person that is not in the database, returns an empty person-not-found person