Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin

This commit is contained in:
Joar Wandborg 2012-03-29 16:19:11 +02:00
commit 90b25eb2d1
4 changed files with 16 additions and 2 deletions

View File

@ -32,6 +32,10 @@ good/bad/ugly). On Debianoid systems::
sudo apt-get install python-gst0.10
Currently you need the gtk and pygtk modules::
sudo apt-get install python-gtk2
Next, modify (and possibly copy over from ``mediagoblin.ini``) your
``mediagoblin_local.ini``. Uncomment this line in the ``[mediagoblin]``
section::

View File

@ -18,8 +18,8 @@
from mediagoblin.db.sql.base import Base
from sqlalchemy import (
Column, Integer, Unicode, UnicodeText, DateTime, Boolean, ForeignKey,
UniqueConstraint)
Column, Integer, ForeignKey)
from sqlalchemy.orm import relationship, backref
class AsciiData(Base):
@ -28,6 +28,8 @@ class AsciiData(Base):
# The primary key *and* reference to the main media_entry
media_entry = Column(Integer, ForeignKey('core__media_entries.id'),
primary_key=True)
get_media_entry = relationship("MediaEntry",
backref=backref("ascii__media_data", cascade="all, delete-orphan"))
DATA_MODEL = AsciiData

View File

@ -19,6 +19,7 @@ from mediagoblin.db.sql.base import Base
from sqlalchemy import (
Column, Integer, Float, ForeignKey)
from sqlalchemy.orm import relationship, backref
from mediagoblin.db.sql.extratypes import JSONEncoded
@ -28,6 +29,9 @@ class ImageData(Base):
# The primary key *and* reference to the main media_entry
media_entry = Column(Integer, ForeignKey('core__media_entries.id'),
primary_key=True)
get_media_entry = relationship("MediaEntry",
backref=backref("image__media_data", cascade="all, delete-orphan"))
width = Column(Integer)
height = Column(Integer)
exif_all = Column(JSONEncoded)

View File

@ -19,6 +19,7 @@ from mediagoblin.db.sql.base import Base
from sqlalchemy import (
Column, Integer, SmallInteger, ForeignKey)
from sqlalchemy.orm import relationship, backref
class VideoData(Base):
@ -27,6 +28,9 @@ class VideoData(Base):
# The primary key *and* reference to the main media_entry
media_entry = Column(Integer, ForeignKey('core__media_entries.id'),
primary_key=True)
get_media_entry = relationship("MediaEntry",
backref=backref("video__media_data", cascade="all, delete-orphan"))
width = Column(SmallInteger)
height = Column(SmallInteger)