File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,8 +62,9 @@ def list_mine():
6262 if token :
6363 token = token .encode ('utf-8' )
6464
65+ print (session ['profile' ])
6566 books , next_page_token = get_model ().list_by_user (
66- user_id = session ['profile' ]['id ' ],
67+ user_id = session ['profile' ]['email ' ],
6768 cursor = token )
6869
6970 return render_template (
@@ -93,8 +94,8 @@ def add():
9394
9495 # If the user is logged in, associate their profile with the new book.
9596 if 'profile' in session :
96- data ['createdBy' ] = session ['profile' ]['displayName ' ]
97- data ['createdById' ] = session ['profile' ]['id ' ]
97+ data ['createdBy' ] = session ['profile' ]['name ' ]
98+ data ['createdById' ] = session ['profile' ]['email ' ]
9899
99100 book = get_model ().create (data )
100101
Original file line number Diff line number Diff line change 3535 < p class ="navbar-text navbar-right ">
3636 {% if session.profile %}
3737 < a href ="/logout ">
38- {% if session.profile.image %}
39- < img class ="img-circle " src ="{{session.profile.image.url }} " width ="24 ">
38+ {% if session.profile.picture %}
39+ < img class ="img-circle " src ="{{session.profile.picture }} " width ="24 ">
4040 {% endif %}
41- {{session.profile.displayName }}
41+ {{session.profile.name }}
4242 </ a >
4343 {% else %}
4444 < a href ="/oauth2authorize "> Login</ a >
You can’t perform that action at this time.
0 commit comments