"""Sample controller module"""

# turbogears imports
from tg import expose, flash, require, url, request, redirect, validate
from tg.controllers import RestController, redirect
from tg import tmpl_context

# third party imports
from tg.i18n import ugettext as _
from repoze.what import predicates

# project specific imports
from soluto.lib.base import BaseController
from soluto.model import DBSession, metadata
from soluto.model import *

from tgext.crud import CrudRestController
from sprox.tablebase import TableBase
from sprox.formbase import AddRecordForm
from sprox.formbase import EditableForm
from sprox.fillerbase import *

from repoze.what.predicates import Any, is_user, not_anonymous, has_permission, in_group
import logging

identity = request.environ.get('repoze.who.identity')

class ProjectTable(TableBase): 
    __model__ = Project
    __omit_fields__ = ['id', '__actions__', 'users', 'scheduled_emails']

class WebController():
    # contructor
    def __init__(self, DBSession, p):
        self.project_controller = p

    project_table = ProjectTable(DBSession)

    @expose('soluto.templates.web.index')
    def index(self):
        # find all the possible email projects available
        tmpl_context.project_widget = self.project_table
        projects = self.project_controller.table_filler.get_value()
        return dict(page='index', projects=projects)



3fa5c91220d12d236be6064d5559b251df8c12cc
<mask token>


class WebController:

    def __init__(self, DBSession, p):
        self.project_controller = p
    project_table = ProjectTable(DBSession)

    @expose('soluto.templates.web.index')
    def index(self):
        tmpl_context.project_widget = self.project_table
        projects = self.project_controller.table_filler.get_value()
        return dict(page='index', projects=projects)

<mask token>


class ProjectTable(TableBase):
    <mask token>
    <mask token>


class WebController:

    def __init__(self, DBSession, p):
        self.project_controller = p
    project_table = ProjectTable(DBSession)

    @expose('soluto.templates.web.index')
    def index(self):
        tmpl_context.project_widget = self.project_table
        projects = self.project_controller.table_filler.get_value()
        return dict(page='index', projects=projects)

<mask token>


class ProjectTable(TableBase):
    __model__ = Project
    __omit_fields__ = ['id', '__actions__', 'users', 'scheduled_emails']


class WebController:

    def __init__(self, DBSession, p):
        self.project_controller = p
    project_table = ProjectTable(DBSession)

    @expose('soluto.templates.web.index')
    def index(self):
        tmpl_context.project_widget = self.project_table
        projects = self.project_controller.table_filler.get_value()
        return dict(page='index', projects=projects)

<mask token>
from tg import expose, flash, require, url, request, redirect, validate
from tg.controllers import RestController, redirect
from tg import tmpl_context
from tg.i18n import ugettext as _
from repoze.what import predicates
from soluto.lib.base import BaseController
from soluto.model import DBSession, metadata
from soluto.model import *
from tgext.crud import CrudRestController
from sprox.tablebase import TableBase
from sprox.formbase import AddRecordForm
from sprox.formbase import EditableForm
from sprox.fillerbase import *
from repoze.what.predicates import Any, is_user, not_anonymous, has_permission, in_group
import logging
identity = request.environ.get('repoze.who.identity')


class ProjectTable(TableBase):
    __model__ = Project
    __omit_fields__ = ['id', '__actions__', 'users', 'scheduled_emails']


class WebController:

    def __init__(self, DBSession, p):
        self.project_controller = p
    project_table = ProjectTable(DBSession)

    @expose('soluto.templates.web.index')
    def index(self):
        tmpl_context.project_widget = self.project_table
        projects = self.project_controller.table_filler.get_value()
        return dict(page='index', projects=projects)

"""Sample controller module"""

# turbogears imports
from tg import expose, flash, require, url, request, redirect, validate
from tg.controllers import RestController, redirect
from tg import tmpl_context

# third party imports
from tg.i18n import ugettext as _
from repoze.what import predicates

# project specific imports
from soluto.lib.base import BaseController
from soluto.model import DBSession, metadata
from soluto.model import *

from tgext.crud import CrudRestController
from sprox.tablebase import TableBase
from sprox.formbase import AddRecordForm
from sprox.formbase import EditableForm
from sprox.fillerbase import *

from repoze.what.predicates import Any, is_user, not_anonymous, has_permission, in_group
import logging

identity = request.environ.get('repoze.who.identity')

class ProjectTable(TableBase): 
    __model__ = Project
    __omit_fields__ = ['id', '__actions__', 'users', 'scheduled_emails']

class WebController():
    # contructor
    def __init__(self, DBSession, p):
        self.project_controller = p

    project_table = ProjectTable(DBSession)

    @expose('soluto.templates.web.index')
    def index(self):
        # find all the possible email projects available
        tmpl_context.project_widget = self.project_table
        projects = self.project_controller.table_filler.get_value()
        return dict(page='index', projects=projects)


