From 63533625468eb96097a5de85ad99a7b0a20bfedd Mon Sep 17 00:00:00 2001 From: Aditi Date: Mon, 22 Jul 2013 07:04:29 +0530 Subject: [PATCH] Change class name to BlogPostData(camelcase) and add blog id attribute to the class. --- mediagoblin/media_types/blog/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mediagoblin/media_types/blog/models.py b/mediagoblin/media_types/blog/models.py index a641861b..a9288c00 100644 --- a/mediagoblin/media_types/blog/models.py +++ b/mediagoblin/media_types/blog/models.py @@ -45,16 +45,16 @@ class Blog(Base, BlogMixin): BACKREF_NAME = "blogpost__media_data" -class BlogpostData(Base): +class BlogPostData(Base): __tablename__ = "blogpost__mediadata" # The primary key *and* reference to the main media_entry media_entry = Column(Integer, ForeignKey('core__media_entries.id'), primary_key=True) - #blog = Column(Integer, ForeignKey('mediatype__blogs.id', nullable=False) + blog = Column(Integer, ForeignKey('mediatype__blogs.id'), nullable=False) get_media_entry = relationship("MediaEntry", backref=backref(BACKREF_NAME, uselist=False, cascade="all, delete-orphan")) -DATA_MODEL = BlogpostData -MODELS = [BlogpostData, Blog] +DATA_MODEL = BlogPostData +MODELS = [BlogPostData, Blog] -- 2.25.1