diff options
author | Joar Wandborg <git@wandborg.com> | 2012-03-29 16:19:11 +0200 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-03-29 16:19:11 +0200 |
commit | 90b25eb2d1563ca945c18151738196d5305568fb (patch) | |
tree | 679d001825f1ec214e9b2bd165574671de33fa8e | |
parent | 97e40b52854a4177ac5da62ca567d4003867e08b (diff) | |
parent | 582958e333e9624654d57fb9e17d3340b5d0ac9b (diff) | |
download | mediagoblin-90b25eb2d1563ca945c18151738196d5305568fb.tar.lz mediagoblin-90b25eb2d1563ca945c18151738196d5305568fb.tar.xz mediagoblin-90b25eb2d1563ca945c18151738196d5305568fb.zip |
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
-rw-r--r-- | docs/source/media-types.rst | 4 | ||||
-rw-r--r-- | mediagoblin/media_types/ascii/models.py | 6 | ||||
-rw-r--r-- | mediagoblin/media_types/image/models.py | 4 | ||||
-rw-r--r-- | mediagoblin/media_types/video/models.py | 4 |
4 files changed, 16 insertions, 2 deletions
diff --git a/docs/source/media-types.rst b/docs/source/media-types.rst index ec068422..a6e76385 100644 --- a/docs/source/media-types.rst +++ b/docs/source/media-types.rst @@ -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:: diff --git a/mediagoblin/media_types/ascii/models.py b/mediagoblin/media_types/ascii/models.py index a35e6958..865c216c 100644 --- a/mediagoblin/media_types/ascii/models.py +++ b/mediagoblin/media_types/ascii/models.py @@ -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 diff --git a/mediagoblin/media_types/image/models.py b/mediagoblin/media_types/image/models.py index 5eb20ed4..fc518daa 100644 --- a/mediagoblin/media_types/image/models.py +++ b/mediagoblin/media_types/image/models.py @@ -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) diff --git a/mediagoblin/media_types/video/models.py b/mediagoblin/media_types/video/models.py index cf42b7c8..35ed92bf 100644 --- a/mediagoblin/media_types/video/models.py +++ b/mediagoblin/media_types/video/models.py @@ -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) |