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

Serializers #55

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Serializers #55

wants to merge 38 commits into from

Conversation

RaquelGarcia999
Copy link
Contributor

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

RaquelGarcia999 and others added 22 commits November 5, 2019 17:03
It has the code from the models.py we've been using rather than the old models.py
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants