Changeset 1307:160547939d6e
- Timestamp:
- 01/12/10 19:34:12 (2 years ago)
- Branch:
- default
- Location:
- zine
- Files:
-
- 4 edited
-
services.py (modified) (2 diffs)
-
shared/js/Zine.js (modified) (2 diffs)
-
templates/admin/_post_helpers.html (modified) (1 diff)
-
utils/dates.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zine/services.py
r1279 r1307 13 13 from zine.models import Comment, Tag 14 14 from zine.privileges import MODERATE_COMMENTS 15 from zine.utils.dates import to_timestamp 15 16 16 17 … … 37 38 'author': comment.author, 38 39 'email': email, 39 'pub_date': int(comment.pub_date.strftime('%s')),40 'pub_date': to_timestamp(comment.pub_date), 40 41 } 41 42 -
zine/shared/js/Zine.js
r1303 r1307 24 24 25 25 replyToComment : function(parent_id) { 26 $('form.comments input[ @name="parent"]').val(parent_id);26 $('form.comments input[name="parent"]').val(parent_id); 27 27 $('#comment-message').hide(); 28 28 this.callJSONService('get_comment', {comment_id: parent_id}, function(c) { … … 42 42 43 43 replyToNothing : function() { 44 $('form.comments input[ @name="parent"]').val('');44 $('form.comments input[name="parent"]').val(''); 45 45 $('#comment-message').fadeOut(); 46 46 }, -
zine/templates/admin/_post_helpers.html
r1043 r1307 11 11 <td class="title"><a href="{{ url_for('admin/edit_post', post_id=post.id) 12 12 }}">{%- if post.title %}{{ post.title|e }}{%- else %}<em>#</em>{%- endif %}</a> 13 [<a href="{{ url_for(post) }}">{{ _('show') }}</a>] 13 14 <td class="author"><a href="{{ url_for('admin/edit_user', 14 15 user_id=post.author.id) }}">{{ post.author.display_name|e }}</a> -
zine/utils/dates.py
r1279 r1307 9 9 """ 10 10 import re 11 from calendar import timegm 11 12 from datetime import datetime, timedelta 12 13 … … 20 21 r'(?:T(\d{2}):(\d{2})(?::(\d{2}(?:\.\d+)?))?(Z|[+-]\d{2}:\d{2})?)?$' 21 22 ) 23 24 25 def to_timestamp(value): 26 """Converts a datetime to an unix timestamp.""" 27 return timegm(value.timetuple()) 22 28 23 29
Note: See TracChangeset
for help on using the changeset viewer.