chrisvans / onbaristawebapp

Web App for Baristas to check in when they are on bar
0 stars 1 forks source link

View: baristaList -- list users that are baristas #10

Closed AJLeonardi closed 11 years ago

AJLeonardi commented 11 years ago

need to amend way we get list of baristas based on search string.

not sure how this will work with the django user stuff now.

chrisvans commented 11 years ago

Users are correctly updated as baristas now and it should function the same. BaristaList has been updated.

AJLeonardi commented 11 years ago

Hey Chris, hoping you can give some clarity to the code in the baristaList. When it sets userdetails = user.get_profile(), where is 'user' defined? if it's the current user, wouldn't that just return the profile page for the current user?

AJLeonardi commented 11 years ago

Hey chris, I updated this a bit in my branch. let me know if you want me to submit a pull request.

chrisvans commented 11 years ago

Ah, good point. I must've left the request.session['user'] line out. Strange that that didn't cause any errors. I believe if you reference first_name through the UserProfile it should return the User attribute.

AJLeonardi commented 11 years ago

figured out the syntax in side the filter -- instead of user.first_name -- you use user__first_name. Not sure why.

chrisvans commented 11 years ago

Took us bout 2 hours huh?