Skip to content
Browse files

changing to a more pythonic naming

  • Loading branch information...
1 parent b348f40 commit 7bf159b6882232d89ea0cba6008e4c6086c1c831 @progrium progrium committed Apr 1, 2010
Showing with 4 additions and 4 deletions.
  1. +2 −2 main.py
  2. +2 −2 templates/main.html
View
4 main.py
@@ -48,7 +48,7 @@ class Update(db.Model):
body = db.StringProperty(required=True, multiline=True)
created = db.DateTimeProperty(auto_now_add=True)
- def userFullname(self):
+ def user_fullname(self):
return fullname(username(self.user))
class Comment(db.Model):
@@ -57,7 +57,7 @@ class Comment(db.Model):
created = db.DateTimeProperty(auto_now_add=True)
update = db.ReferenceProperty(Update)
- def userFullname(self):
+ def user_fullname(self):
return fullname(username(self.user))
View
4 templates/main.html
@@ -7,7 +7,7 @@
</form>
{% for update in updates %}
- <p>{{update.body}} | {{update.created|timesince}} ago | {{update.userFullname}} |
+ <p>{{update.body}} | {{update.created|timesince}} ago | {{update.user_fullname}} |
<a href="javascript:void()" onclick="toggleComment({{update.key.id}})" id="comment-link-{{update.key.id}}">Comment</a>
<form action="/comment/{{update.key.id}}" method="post" id="comment-form-{{update.key.id}}" style="display: none;">
<input type="text" name="body" /> <input type="submit" value="Comment" />
@@ -16,7 +16,7 @@
</p>
{% for comment in update.comment_set %}
<p style="margin-left: 20px;">
- {{comment.body}} | {{comment.created|timesince}} ago | {{comment.userFullname}}
+ {{comment.body}} | {{comment.created|timesince}} ago | {{comment.user_fullname}}
</p>
{% endfor %}
{% endfor %}

0 comments on commit 7bf159b

Please sign in to comment.
Something went wrong with that request. Please try again.