From 8a56acfc823765a824f6ba4fa3b3ea6545f5be9e Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Wed, 20 Jul 2016 09:12:44 +0200 Subject: [PATCH] Some cleanups --- digimarks.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/digimarks.py b/digimarks.py index 3d0be18..6ab9650 100644 --- a/digimarks.py +++ b/digimarks.py @@ -11,7 +11,6 @@ from utilkit import datetimeutil from flask import Flask, abort, redirect, render_template, request, url_for from flask_peewee.db import Database -from flask_peewee.utils import object_list from peewee import * try: @@ -28,7 +27,6 @@ DATABASE = { 'name': os.path.join(APP_ROOT, 'bookmarks.db'), 'engine': 'peewee.SqliteDatabase', } -#PASSWORD = 'shh' #PHANTOM = '/usr/local/bin/phantomjs' #SCRIPT = os.path.join(APP_ROOT, 'screenshot.js') @@ -139,9 +137,11 @@ class Bookmark(db.Model): def get_tags_for_user(userkey): """ Extract all tags from the bookmarks """ bookmarks = Bookmark.select(Bookmark.userkey==userkey) + tags = [] for bookmark in bookmarks: these_tags = bookmark.tags.split(',') print these_tags + return tags @app.route('/') @@ -201,9 +201,6 @@ def addbookmark(userkey): #@app.route('//adding') def addingbookmark(userkey): """ Add the bookmark from form submit by /add """ - #password = request.args.get('password') - #if password != PASSWORD: - # abort(404) if request.method == 'POST': title = request.form['title']