From 96f7542104dd8c8a61d2532cfbc180c2d11577c9 Mon Sep 17 00:00:00 2001 From: Wout Schellaert Date: Thu, 26 Mar 2015 22:45:41 +0100 Subject: [PATCH] Dunno what ichanged --- app/admin.py | 1 - app/models.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin.py b/app/admin.py index 335e78f..008380e 100644 --- a/app/admin.py +++ b/app/admin.py @@ -7,7 +7,6 @@ from app import app, db from models import User - class ModelBaseView(ModelView): def is_accessible(self): diff --git a/app/models.py b/app/models.py index 8d37025..15e48d2 100644 --- a/app/models.py +++ b/app/models.py @@ -1,5 +1,6 @@ from app import db + # Create database models class User(db.Model): id = db.Column(db.Integer, primary_key=True) @@ -74,7 +75,6 @@ class Order(db.Model): stoptime = db.Column(db.DateTime) orders = db.relationship('OrderItem', backref='order', lazy='dynamic') - def configure(self, courrier, location, starttime, stoptime): self.courrier = courrier self.location = location @@ -84,6 +84,7 @@ class Order(db.Model): def __repr__(self): return 'Order' + class OrderItem(db.Model): id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id'))