-
Notifications
You must be signed in to change notification settings - Fork 4
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
IEEE-21 /api/event/teams/team #280
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0512791
Updated with full serializer, views and test cases
arshinmar 44f41c8
Added some updated tests
arshinmar c0433cd
Expected final tests
arshinmar f1a29f6
Updated with truly final tests, pending comment
arshinmar 5223eda
Merge branch 'develop' into 21-api-team
arshinmar 7b9d8b6
Updated with proper message formatting
arshinmar aa64cf3
Merge branch '21-api-team' of github.com:ieeeuoft/hackathon-template …
arshinmar bcee2bb
Added stuff to gitignore, and formatting changed
arshinmar 3220405
Update .gitignore
arshinmar 2220f1d
Update views.py
arshinmar ec739ed
Update views.py
arshinmar 7ff4af3
Update views.py
arshinmar cea4904
Update tests.py
arshinmar 2c85169
Update test_api.py
arshinmar b3f8362
Changed profiles related name to profile
arshinmar 6e3f349
Merge branch '21-api-team' of github.com:ieeeuoft/hackathon-template …
arshinmar 16f8673
Update serializers.py
arshinmar 3fbf88e
Merge branch 'develop' into 21-api-team
arshinmar 0fa45fb
Updated with profile views
arshinmar 6afc15d
Merge branch '21-api-team' of github.com:ieeeuoft/hackathon-template …
arshinmar fb24b71
All tests work
arshinmar ef078d1
One test still failing despite changed imports
arshinmar b9d6c71
Removed unused imports
arshinmar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
from django.urls import path | ||
|
||
from event import api_views | ||
from event import api_views, views | ||
|
||
app_name = "event" | ||
|
||
urlpatterns = [ | ||
path("users/user/", api_views.CurrentUserAPIView.as_view(), name="current-user"), | ||
path("teams/team/", views.CurrentTeamAPIView.as_view(), name="current-team"), | ||
] |
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't in the ticket, but I think we should add a profiles serializer into here. That way, on the frontend, we can just get
/api/event/teams/team/
, and we'll have all the information we need about the team (aka, the members on it), rather than having to make a separate request.When we eventually have a list view of
/api/event/teams/
for the admin side of the site, that will also come in handy so we don't have to fetch the list of team members separately.To do that, you won't want to use the
ProfileSerializer
below, since that includes the team - so you'll end up with a circular reference. I would create a newProfileInTeamSerializer
, that includes the profile as well as important related user fields - first name, last name, email. I think you can just putuser__first_name
etc in the fields list, otherwise you'll need a user serializer too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, disregard this for now. I'll create a separate ticket, so that we don't get in the habit of scope creep (which I am bad for).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, is it ok if I resolve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it unresolved just so it's visible for future reference