Skip to content

Commit

Permalink
changing to a more pythonic naming
Browse files Browse the repository at this point in the history
  • Loading branch information
progrium committed Apr 2, 2010
1 parent b348f40 commit 7bf159b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions main.py
Expand Up @@ -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):
Expand All @@ -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))


Expand Down
4 changes: 2 additions & 2 deletions templates/main.html
Expand Up @@ -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" />
Expand All @@ -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 %}
Expand Down

0 comments on commit 7bf159b

Please sign in to comment.