Commits

Alessandro Molina committed 51c7221

Index publishing date

Comments (0)

Files changed (1)

smallpress/model/models.py

     blog_id = Column(Integer, ForeignKey(primary_key(Blog)), nullable=True, index=True)
     blog = relation(Blog, backref=backref('articles'), lazy='joined')
 
-    publish_date = Column(DateTime, nullable=False, default=datetime.now)
+    publish_date = Column(DateTime, nullable=False, default=datetime.now, index=True)
     update_date = Column(DateTime, nullable=False, default=datetime.now)
     description = Column(Unicode(150), nullable=False, default=u'Empty article, edit or delete this')
     content = Column(Unicode(32000), nullable=False, default=u'')