Added a table to store the file extension of a model.
This commit is contained in:
parent
418d1b149b
commit
d25ed5dd4c
@ -18,7 +18,7 @@
|
|||||||
from mediagoblin.db.sql.base import Base
|
from mediagoblin.db.sql.base import Base
|
||||||
|
|
||||||
from sqlalchemy import (
|
from sqlalchemy import (
|
||||||
Column, Integer, Float, ForeignKey)
|
Column, Integer, Float, String, ForeignKey)
|
||||||
from sqlalchemy.orm import relationship, backref
|
from sqlalchemy.orm import relationship, backref
|
||||||
|
|
||||||
|
|
||||||
@ -39,6 +39,8 @@ class StlData(Base):
|
|||||||
height = Column(Float)
|
height = Column(Float)
|
||||||
depth = Column(Float)
|
depth = Column(Float)
|
||||||
|
|
||||||
|
file_type = Column(String)
|
||||||
|
|
||||||
|
|
||||||
DATA_MODEL = StlData
|
DATA_MODEL = StlData
|
||||||
MODELS = [StlData]
|
MODELS = [StlData]
|
||||||
|
@ -164,6 +164,7 @@ def process_stl(entry):
|
|||||||
"width" : model.width,
|
"width" : model.width,
|
||||||
"height" : model.height,
|
"height" : model.height,
|
||||||
"depth" : model.depth,
|
"depth" : model.depth,
|
||||||
|
"file_type" : ext,
|
||||||
}
|
}
|
||||||
entry.media_data_init(**dimensions)
|
entry.media_data_init(**dimensions)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user