Add vim modeline
This commit is contained in:
parent
29774d6574
commit
a38d1f4409
1 changed files with 13 additions and 8 deletions
|
@ -14,6 +14,7 @@ if not path.exists(DATABASE):
|
||||||
# TODO: Add fetching of top N users by score
|
# TODO: Add fetching of top N users by score
|
||||||
# TODO: Add ability to store and retrieve avatars (as image files?)
|
# TODO: Add ability to store and retrieve avatars (as image files?)
|
||||||
|
|
||||||
|
|
||||||
def get_users(username_list):
|
def get_users(username_list):
|
||||||
"""
|
"""
|
||||||
Gets a list of users searching by name.
|
Gets a list of users searching by name.
|
||||||
|
@ -48,9 +49,11 @@ def get_top_N(search_parameter, desc, N):
|
||||||
conn.row_factory = sqlite3.Row
|
conn.row_factory = sqlite3.Row
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
if desc == True:
|
if desc == True:
|
||||||
cursor.execute("select * from users order by ? desc limit ?", (search_parameter, N))
|
cursor.execute("select * from users order by ? desc limit ?",
|
||||||
|
(search_parameter, N))
|
||||||
else:
|
else:
|
||||||
cursor.execute("select * from users order by ? asc limit ?", (search_parameter, N))
|
cursor.execute("select * from users order by ? asc limit ?",
|
||||||
|
(search_parameter, N))
|
||||||
|
|
||||||
output = cursor.fetchall()
|
output = cursor.fetchall()
|
||||||
#print(output)
|
#print(output)
|
||||||
|
@ -156,3 +159,5 @@ def application(environ, start_response):
|
||||||
start_response(status, response_headers)
|
start_response(status, response_headers)
|
||||||
|
|
||||||
return [output]
|
return [output]
|
||||||
|
|
||||||
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4 expandtab
|
||||||
|
|
Reference in a new issue