This document provides instructions for bootstrapping a Pyramid application with FormAlchemy and Bootstrap styling in 5 easy steps:
1. Install fa.bootstrap with pip
2. Create a new Pyramid project using the fa.bootstrap template
3. Change to the new project directory
4. Install dependencies with setup.py
5. Run the development server
It also provides a simple example of defining a model class and including FormAlchemy and the Bootstrap styling in the application configuration.
7. fa.bootstrap - demo app
★ model definition by
class MyModel(Base):
__tablename__ = 'models'
id = Column(Integer, primary_key=True)
name = Column(Unicode(255), unique=True)
value = Column(Integer)
8. fa.bootstrap - demo app
★ model definition by
★ include it in your application
config.include('pyramid_formalchemy')
config.include('fa.bootstrap')
config.formalchemy_admin("/admin",
models=models,
forms=forms,
session_factory=models.DBSession,
view="myapp.forms.ModelView")