Skip to content

Conversation

@rbala19
Copy link

@rbala19 rbala19 commented Jan 4, 2018

@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.

@hbhargava7
Copy link
Member

wow I am so impressed we are a legit software company <3
(I say as I write extraneous, irrelevant posts)

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.

2 participants