Remove some edbob, unicode tweak, etc.
In particular it was noticed that edbob has been configuring FormAlchemy all this time, whoops. That's still partially the case but now at least it's explicit.
This commit is contained in:
parent
e47477f0c4
commit
c4a19f279b
4 changed files with 61 additions and 30 deletions
|
@ -1,9 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2012 Lance Edgar
|
||||
# Copyright © 2010-2015 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -21,22 +20,29 @@
|
|||
# along with Rattail. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
"""
|
||||
Application Entry Point
|
||||
"""
|
||||
|
||||
from pyramid.config import Configurator
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
import edbob
|
||||
import os
|
||||
|
||||
from sqlalchemy import engine_from_config
|
||||
from .db import Session
|
||||
|
||||
import edbob
|
||||
from edbob.pyramid.forms.formalchemy import TemplateEngine
|
||||
|
||||
from rattail.db.types import GPCType
|
||||
|
||||
import formalchemy
|
||||
from pyramid.config import Configurator
|
||||
from pyramid.authentication import SessionAuthenticationPolicy
|
||||
from zope.sqlalchemy import ZopeTransactionExtension
|
||||
|
||||
from pyramid.authentication import SessionAuthenticationPolicy
|
||||
from .auth import TailboneAuthorizationPolicy
|
||||
from tailbone.db import Session
|
||||
from tailbone.auth import TailboneAuthorizationPolicy
|
||||
from tailbone.forms import GPCFieldRenderer
|
||||
|
||||
|
||||
def main(global_config, **settings):
|
||||
|
@ -73,6 +79,10 @@ def main(global_config, **settings):
|
|||
# Bring in the rest of Tailbone.
|
||||
config.include('tailbone')
|
||||
|
||||
# Configure FormAlchemy.
|
||||
formalchemy.config.engine = TemplateEngine()
|
||||
formalchemy.FieldSet.default_renderers[GPCType] = GPCFieldRenderer
|
||||
|
||||
# Consider PostgreSQL server restart errors to be "retryable."
|
||||
config.add_tween('edbob.pyramid.tweens.sqlerror_tween_factory',
|
||||
under='pyramid_tm.tm_tween_factory')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue