make it compatible with python 3.4

This commit is contained in:
Martin
2016-04-20 12:56:59 +02:00
parent 8ad75a0c41
commit bfce747ba1
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1 +1 @@
from json import JSONEncoder, JsonSerializer
from .json import JSONEncoder, JsonSerializer
+1 -1
View File
@@ -1 +1 @@
from designer import Designer
from .designer import Designer
+1 -1
View File
@@ -27,7 +27,7 @@ def show(id):
def update(id):
designer = Designer.query.get_or_404(id)
data = request.json
for k, v in data.iteritems():
for k, v in data.items():
setattr(designer, k, v)
db.session.add(designer)
db.session.commit()
+3 -3
View File
@@ -7,17 +7,17 @@ manager = Manager(app)
@manager.command
def initdb():
db.create_all()
print 'All tables created'
print("All tables created")
@manager.command
def dropdb():
if prompt_bool("Are you sure you want to lose all your data"):
db.drop_all()
print 'All tables dropped'
print("All tables dropped")
@manager.command
def seed():
print 'Adding sample data %s' % db.engine.url
print("Adding sample data")
designer = Designer(name="Martin", path='/martin')
db.session.add(designer)
db.session.commit()