Show user picture on blog update page

pull/2/head
Noah 2014-04-06 20:02:33 -07:00
parent 49496e1c2e
commit aa395ca206
2 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ def update():
# Get our available avatars. # Get our available avatars.
g.info["avatars"] = Blog.list_avatars() g.info["avatars"] = Blog.list_avatars()
g.info["userpic"] = User.get_picture(uid=g.info["session"]["uid"])
# Default vars. # Default vars.
g.info.update(dict( g.info.update(dict(

View File

@ -83,7 +83,7 @@
{% block scripts %} {% block scripts %}
<script> <script>
var userPic = "/static/avatars/default.png"; // TODO var userPic = "{% if userpic %}{{ app['photo_url'] }}/{{ userpic }}{% else %}/static/avatars/default.png{% endif %}";
$(document).ready(function() { $(document).ready(function() {
// Preview their selected avatar. // Preview their selected avatar.