Loading liteshort.py +1 −1 Original line number Diff line number Diff line Loading @@ -136,7 +136,6 @@ def list_shortlinks_page(page, limit=50): assert type(limit) == int start_index = (page - 1) * limit result = query_db('SELECT * FROM urls ORDER BY short LIMIT ? OFFSET ?', (limit, start_index), False, None) result = nested_list_to_dict(result) return result Loading Loading @@ -370,6 +369,7 @@ def admin(): page = 1 urls = list_shortlinks_page(page, app.config['admin_links_per_page']) return render_template('admin.html', urls=urls, page=page, page_count=page_count, num_items=num_items) else: return render_template('login.html') Loading templates/admin.html +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ A copy of the MIT license can be obtained at https://mit-license.org/ <th>Long link</th> <th>Delete?</th> </tr> {% for long, short in urls.items() %} {% for long, short in urls %} <tr> <td>{{ short }}</td> <td>{{ long }}</td> Loading Loading
liteshort.py +1 −1 Original line number Diff line number Diff line Loading @@ -136,7 +136,6 @@ def list_shortlinks_page(page, limit=50): assert type(limit) == int start_index = (page - 1) * limit result = query_db('SELECT * FROM urls ORDER BY short LIMIT ? OFFSET ?', (limit, start_index), False, None) result = nested_list_to_dict(result) return result Loading Loading @@ -370,6 +369,7 @@ def admin(): page = 1 urls = list_shortlinks_page(page, app.config['admin_links_per_page']) return render_template('admin.html', urls=urls, page=page, page_count=page_count, num_items=num_items) else: return render_template('login.html') Loading
templates/admin.html +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ A copy of the MIT license can be obtained at https://mit-license.org/ <th>Long link</th> <th>Delete?</th> </tr> {% for long, short in urls.items() %} {% for long, short in urls %} <tr> <td>{{ short }}</td> <td>{{ long }}</td> Loading