Member and committee tabs #1
Open
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.
@ellenluo
For these following changes: No DB changes were required, although I did manually change some tables to create test data. Also, my original design for the Committees page was to display all committees that the logged in user was on, and on clicking those committees, they would display all members. To achieve this change, we just need to filter committees we display on committees.html. However, this change is more difficult than seems, though, because a request defaults to an AnonymousUser when no "get_user" method is defined in the backend. See this link:
https://stackoverflow.com/questions/5376985/django-request-user-is-always-anonymous-user
I wasn't too sure how to implement this change, so I just opted to display all Committees on committee.html, and trigger their members upon click.
admin.py: For some reason I was running into errors with the Member field "confirmed". An error message told me that the "confirmed" field was not an option when I triggered its usages in views.py. I therefore commented out all usages of the field.
models.py: Forgot to remove the field I added then commented out. I added an isActive method to allow templates to check if a member was active before displaying him/her.
Base.html: Added a Committee tab
committees.html: Shows all committees and displays their members upon clicking
committee_members.html: Shows all members that are part of a particular committee
member_list.html: Analogous to event_list.html. Shows list of all members and displays Bio and Full name upon clicking a member.
member_details.html: Analogous to event_details.html: Shows bio and name of each member.
Adding corresponding views and urls. Most interesting is the committee_members view which filters Members by committee and displays relevant members within committee_members.html.