# Path: atomicpress/models.py
# class Blog(db.Model):
# class Author(db.Model):
# class PostType():
# class PostStatus():
# class Post(db.Model):
# class Tag(db.Model):
# class Category(db.Model):
#     def __unicode__(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     POST = "post"
#     PAGE = "page"
#     ATTACHMENT = "attachment"
#     REVISION = "revision"
#     NAVIGATION_MENU = "nav_menu_item"
#     PUBLISH = "publish"
#     DRAFT = "draft"
#     FUTURE = "future"
#     PENDING = "pending"
#     PRIVATE = "private"
#     TRASH = "trash"
# 
# 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():


from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from wtforms.validators import Required
from atomicpress import models
from atomicpress.app import db
# -*- coding: utf-8 -*-




class HomeView(AdminIndexView):
    @expose("/")
    def index(self):
        return self.render('admin/home.html')


class PostView(ModelView):
    column_default_sort = ('date', True)
    column_searchable_list = ('name', 'title', 'content')
    column_filters = ('type', 'status')
    column_list = ('title', 'status', 'modified', 'date', 'type')
    can_export = True

    form_choices = {
        'status': [
            (models.PostStatus.PUBLISH, 'Publish'),
            (models.PostStatus.DRAFT, 'Draft'),
            (models.PostStatus.FUTURE, 'Future'),
            (models.PostStatus.PENDING, 'Pending'),

# Path: atomicpress/models.py
# class Blog(db.Model):
# class Author(db.Model):
# class PostType():
# class PostStatus():
# class Post(db.Model):
# class Tag(db.Model):
# class Category(db.Model):
#     def __unicode__(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     POST = "post"
#     PAGE = "page"
#     ATTACHMENT = "attachment"
#     REVISION = "revision"
#     NAVIGATION_MENU = "nav_menu_item"
#     PUBLISH = "publish"
#     DRAFT = "draft"
#     FUTURE = "future"
#     PENDING = "pending"
#     PRIVATE = "private"
#     TRASH = "trash"
# 
# 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/admin.py
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from wtforms.validators import Required
from atomicpress import models
from atomicpress.app import db

# -*- coding: utf-8 -*-




class HomeView(AdminIndexView):
    @expose("/")
    def index(self):
        return self.render('admin/home.html')


class PostView(ModelView):
    column_default_sort = ('date', True)
    column_searchable_list = ('name', 'title', 'content')
    column_filters = ('type', 'status')
    column_list = ('title', 'status', 'modified', 'date', 'type')
    can_export = True

    form_choices = {
        'status': [
            (models.PostStatus.PUBLISH, 'Publish'),
            (models.PostStatus.DRAFT, 'Draft'),
            (models.PostStatus.FUTURE, 'Future'),
            (models.PostStatus.PENDING, 'Pending'),

            (models.PostStatus.PENDING, 'Private'),