forked from orbit-oss/flask
Removed unused stuff from minitwit and fixed a bug.
This commit is contained in:
parent
0770f5c637
commit
73a47a0db1
1 changed files with 1 additions and 3 deletions
|
|
@ -9,7 +9,6 @@
|
||||||
:license: BSD, see LICENSE for more details.
|
:license: BSD, see LICENSE for more details.
|
||||||
"""
|
"""
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
import re
|
|
||||||
import time
|
import time
|
||||||
import sqlite3
|
import sqlite3
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
|
|
@ -96,7 +95,6 @@ def timeline():
|
||||||
"""
|
"""
|
||||||
if not g.user:
|
if not g.user:
|
||||||
return redirect(url_for('public_timeline'))
|
return redirect(url_for('public_timeline'))
|
||||||
offset = request.args.get('offset', type=int)
|
|
||||||
return render_template('timeline.html', messages=query_db('''
|
return render_template('timeline.html', messages=query_db('''
|
||||||
select message.*, user.* from message, user
|
select message.*, user.* from message, user
|
||||||
where message.author_id = user.user_id and (
|
where message.author_id = user.user_id and (
|
||||||
|
|
@ -123,7 +121,7 @@ def user_timeline(username):
|
||||||
[username], one=True)
|
[username], one=True)
|
||||||
if profile_user is None:
|
if profile_user is None:
|
||||||
abort(404)
|
abort(404)
|
||||||
followd = False
|
followed = False
|
||||||
if g.user:
|
if g.user:
|
||||||
followed = query_db('''select 1 from follower where
|
followed = query_db('''select 1 from follower where
|
||||||
follower.who_id = ? and follower.whom_id = ?''',
|
follower.who_id = ? and follower.whom_id = ?''',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue