Closed eddiechoi00 closed 2 years ago
I don't have time to review tonight but will take a look tomorrow. Did you by any chance see user/model.py? What I did when I took a crack at this one was adding a new function to the user class called is_wustl that returned true if the email contained @wustl.edu or not
That's kinda what I did, the unnecessary changes I was talking about was to call the current user's email from views.py.
The css part I was talking about is pretty much neglectable if you don't mind how it looks.
I was able to get the is_wustl field updating properly on user creation. Are you able to make changes to the user_wustl
branch in this repo? I don't think it should be protected.
How were you able to pass the is_wustl data to the form?
I wasn't aware about the is_wustl field before, so I ended up making a request for the user on views.py and feeding it into forms.py as a parameter on the classes. We can't make a request on forms.py so I had to do it through views.py.
I can't check right now if I can make changes to the user_wustl
branch but I will when I get the chance.
Maybe it has something to do with two different forms existing? It's an error with the form being valid, maybe an error with the live/online question not being included in the form for non-wustl people? Maybe that question isn't being rendered, but the server still expects a response for it.
Tbh I have no clue, but that's my first guess. Lmk if you need help and I can take a look tomorrow
Patch Notes
Addressing Issue #11; if the user uses @wustl.edu, the option for live or online will appear. If the user does not use a @wustl.edu email, then a confirmation checkbox will appear acknowledging that non-WashU students will only be able to attend the event online.
Additional Notes (optional)
I may have made some unnecessary changes to make this work, please call me out if I did. Also had trouble getting the live or online options horizontally instead of vertically; looks like all the other sections are grouped under a
<style>
head, but couldn't really figure out a way to fit the new ID I created into that. It's a very minor thing just for the aesthetics, but if it's an easy fix, I think it'll be worth it.