# Path: atomicpress/app.py
# DEFAULT_EXTENSIONS = (
#     "atomicpress.ext.importer",
#     "atomicpress.ext.exporter",
#     "atomicpress.ext.ftp",
#     "atomicpress.ext.s3",
#     "atomicpress.ext.prefill",
# )
# DEFAULT_MARKDOWN_EXTENSIONS = [
#     "markdown.extensions.tables",
#     "markdown.extensions.nl2br",
#     "markdown.extensions.fenced_code",
#     "markdown.extensions.headerid"
# ]
# def setup(init_run=False):
# def activate_extensions():
# def activate_theme(theme):
# def run():
# 
# Path: atomicpress/models.py
# class Post(db.Model):
#     id = db.Column(db.Integer, primary_key=True)
#     parent_id = db.Column(db.Integer, db.ForeignKey('post.id'))
#     parent = relationship("Post", remote_side=[id])
# 
#     author_id = db.Column(db.Integer, db.ForeignKey('author.id'))
#     author = relationship("Author")
#     status = db.Column(db.String(20), default=PostStatus.DRAFT)
#     type = db.Column(db.String(20), default=PostType.POST)
#     guid = db.Column(db.String(255))
#     name = db.Column(db.String(200))
#     title = db.Column(db.Text())
#     excerpt = db.Column(db.Text())
#     content = db.Column(db.Text())
#     modified = db.Column(db.DateTime, default=datetime.datetime.utcnow)
#     date = db.Column(db.DateTime, default=datetime.datetime.utcnow)
#     template = db.Column(db.String(255))
# 
#     order = db.Column(db.Integer, default=0)
#     markdown = db.Column(db.Boolean())
#     mime_type = db.Column(db.String(100))
#     tags = relationship("Tag",
#                         secondary=tag_association_table,
#                         backref="post")
# 
#     categories = relationship("Category",
#                               secondary=category_association_table,
#                               backref="post")
# 
#     def __unicode__(self):
#         return self.title
# 
# class PostStatus():
#     PUBLISH = "publish"
#     DRAFT = "draft"
#     FUTURE = "future"
#     PENDING = "pending"
#     PRIVATE = "private"
#     TRASH = "trash"


from sqlalchemy import or_, and_
from atomicpress.app import app
from atomicpress.models import Post, PostStatus



def gen_post_status():
    """
    Show only published posts outside debug.
    """

    if not app.config["DEBUG"]:
        post_status = and_(Post.status == PostStatus.PUBLISH)
    else:
        post_status = or_(Post.status == PostStatus.PUBLISH,

# Path: atomicpress/app.py
# DEFAULT_EXTENSIONS = (
#     "atomicpress.ext.importer",
#     "atomicpress.ext.exporter",
#     "atomicpress.ext.ftp",
#     "atomicpress.ext.s3",
#     "atomicpress.ext.prefill",
# )
# DEFAULT_MARKDOWN_EXTENSIONS = [
#     "markdown.extensions.tables",
#     "markdown.extensions.nl2br",
#     "markdown.extensions.fenced_code",
#     "markdown.extensions.headerid"
# ]
# def setup(init_run=False):
# def activate_extensions():
# def activate_theme(theme):
# def run():
# 
# Path: atomicpress/models.py
# class Post(db.Model):
#     id = db.Column(db.Integer, primary_key=True)
#     parent_id = db.Column(db.Integer, db.ForeignKey('post.id'))
#     parent = relationship("Post", remote_side=[id])
# 
#     author_id = db.Column(db.Integer, db.ForeignKey('author.id'))
#     author = relationship("Author")
#     status = db.Column(db.String(20), default=PostStatus.DRAFT)
#     type = db.Column(db.String(20), default=PostType.POST)
#     guid = db.Column(db.String(255))
#     name = db.Column(db.String(200))
#     title = db.Column(db.Text())
#     excerpt = db.Column(db.Text())
#     content = db.Column(db.Text())
#     modified = db.Column(db.DateTime, default=datetime.datetime.utcnow)
#     date = db.Column(db.DateTime, default=datetime.datetime.utcnow)
#     template = db.Column(db.String(255))
# 
#     order = db.Column(db.Integer, default=0)
#     markdown = db.Column(db.Boolean())
#     mime_type = db.Column(db.String(100))
#     tags = relationship("Tag",
#                         secondary=tag_association_table,
#                         backref="post")
# 
#     categories = relationship("Category",
#                               secondary=category_association_table,
#                               backref="post")
# 
#     def __unicode__(self):
#         return self.title
# 
# class PostStatus():
#     PUBLISH = "publish"
#     DRAFT = "draft"
#     FUTURE = "future"
#     PENDING = "pending"
#     PRIVATE = "private"
#     TRASH = "trash"


# Path: atomicpress/themes/minimal/helpers.py
from sqlalchemy import or_, and_
from atomicpress.app import app
from atomicpress.models import Post, PostStatus




def gen_post_status():
    """
    Show only published posts outside debug.
    """

    if not app.config["DEBUG"]:
        post_status = and_(Post.status == PostStatus.PUBLISH)
    else:
        post_status = or_(Post.status == PostStatus.PUBLISH,

                          Post.status == PostStatus.DRAFT)