Added a table to store the file extension of a model.

This commit is contained in:
Aeva Ntsc 2012-10-16 01:01:34 -05:00 committed by Christopher Allan Webber
parent 418d1b149b
commit d25ed5dd4c
2 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,7 @@
from mediagoblin.db.sql.base import Base
from sqlalchemy import (
Column, Integer, Float, ForeignKey)
Column, Integer, Float, String, ForeignKey)
from sqlalchemy.orm import relationship, backref
@ -39,6 +39,8 @@ class StlData(Base):
height = Column(Float)
depth = Column(Float)
file_type = Column(String)
DATA_MODEL = StlData
MODELS = [StlData]

View File

@ -164,6 +164,7 @@ def process_stl(entry):
"width" : model.width,
"height" : model.height,
"depth" : model.depth,
"file_type" : ext,
}
entry.media_data_init(**dimensions)