This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
from flask.ext.script import Manager | |
from sqlalchemy import update | |
import os | |
import subprocess | |
import json | |
from server import app | |
from server import db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Asset(db.Model): | |
id = db.Column(db.Integer, primary_key=True) | |
name = db.Column(db.String(120), nullable=False) | |
asset_type_id = db.Column(db.Integer(), db.ForeignKey('asset_type.id'), nullable=False) | |
asset_type = db.relationship('AssetType', backref='assets') | |
# I would like a nicer way to do this | |
@property | |
def versions(self): |