Questions tagged [formalchemy]

formalchemy is a python library that allows for easy HTML forms manipulation when using SQLAlchemy models.

formalchemy works to eliminate boilerplate code when working with HTML forms by introspecting into an SQLAlchemy model and automatically creating forms based on (optionally user-generated) templates. formalchemy additionally offers a module for the pyramid framework that generates administrator templates for adding, deleting, or modifying data in SQLAlchemy models.

Documentation:

21 questions
15
votes
6 answers

Admin interface for SQLAlchemy?

I've been developing a Django app, however I've recently changed the overall architecture plan. I no longer need a web-framework, just a simple Python script, so I'm changing from using the Django ORM to using SQLAlchemy to create and manage the…
Jon Cox
  • 10,622
  • 22
  • 78
  • 123
5
votes
1 answer

Pyramid and FormAlchemy admin interface

I have a pyramid project using the formalchemy admin interface. I added the basic ACL authentication and the pyramid_formalchemy plugin always denys even though I am authenticated. Any thoughts on how only allow authenticated users to use the…
Conceited Code
  • 4,517
  • 3
  • 29
  • 32
4
votes
1 answer

html parsing with lxml when there's no root tag

I've been building a scaffolding library for sqlalchemy using lxml and formalchemy, and I'm having a hard time getting them to play nicely. specifically, formalchemy.FieldSet.render() returns a fragment of html with no root tag, and I cannot seem…
SingleNegationElimination
  • 151,563
  • 33
  • 264
  • 304
3
votes
1 answer

Alternate forms libraries on django eg sprox, formalchemy

Has anyone had any joy/pain with using other form libraries in django projects (with SQLAlchemy models initially, but perhaps to use with django models in future)? Initial impressions are that sprox is more flexible and decoupled but that…
Ben Ford
  • 2,087
  • 21
  • 26
3
votes
4 answers

Do not require non-NULL field (allow empty strings) in FormAlchemy

I'm fairly novice to FormAlchemy and it seems that I don't get something. I have a SQLAlchemy model defined like this: ... class Device(meta.Base): __tablename__ = 'devices' id = sa.Column('id_device', sa.types.Integer, primary_key=True) …
drdaeman
  • 11,159
  • 7
  • 59
  • 104
3
votes
1 answer

python3 formalchemy alternative

Is there a FormAlchemy alternative for Python3.2? I'm specifically interested in using it in conjunction with Pyramid. I'm getting syntax errors when setting up FormAlchemy1.3.3 so their latest release is not compatible.
Sheena
  • 15,590
  • 14
  • 75
  • 113
2
votes
2 answers

Adding pyramid_formalchemy to existing app

Try to add pyramid_formalchemy to existing app as described in http://docs.formalchemy.org/pyramid_formalchemy/ the following way: $ pcreate -s pyramid_fa myapp In result inside package "myapp" directory with the same name is created, it contains…
drnextgis
  • 2,194
  • 1
  • 25
  • 32
2
votes
1 answer

Adding SQLAlchemy records with Formalchemy

I am trying to use Formalchemy to add a new record to my SQLAlchemy table DataTBL. fs = FieldSet(DataTBL) fs.bind(DataTBL, request=requestobject) if fs.validate(): fs.sync() session.commit() This gives me a validation error because the…
boadescriptor
  • 735
  • 2
  • 9
  • 29
2
votes
0 answers

Formalchemy - form for one to many relation

I've got simple 'one-to-many' relation written with sqlalchemy: class Product(Base, Asset): description = Column(sa.Text) image = Column(sa.VARCHAR(length=150)) package_type_prices =…
derenio
  • 2,633
  • 2
  • 19
  • 15
2
votes
1 answer

custom pyramid_formalchemy forms

I'm having problems creating custom forms in pyramid_formalchemy. I suspect there is a bug in the package and wanted to confirm I'm not missing anything. My setup looks like this: def includeme(config): config.include('pyramid_formalchemy') …
lostdorje
  • 6,150
  • 9
  • 44
  • 86
2
votes
1 answer

How can I add new objects to FormAlchemy's Grid

I'd like to implement an "add row" button on some of my FormAlchemy grid forms to create objects. Reading through the source it would appear that there isn't this functionality at present so wondered if there's another project that does it, or if…
Ben Ford
  • 2,087
  • 21
  • 26
2
votes
1 answer

Custom ordering of fields inside Formalchemy Fieldset

We have a pretty long table where a row should be rendered using FormAlchemy. The requirement is that the 'title' column should be displayed first and all other fields should follow in alphabetical order. Is there a straight forward way to move and…
user2665694
1
vote
2 answers

Change other fields value during validation with Formalchemy?

Writing custom validators for Formalchemy is simple. During the validation of SOMEFIELD I can access another fields value using field.parent.SOMEOTHERFIELD.value. Is it possible to change SOMEOTHERFIELD's value during the validation of SOMEFIELD?…
boadescriptor
  • 735
  • 2
  • 9
  • 29
1
vote
1 answer

Pyramid + FormAlchemy model improvement

I currently have two separate models (shown below), which works fine for my application in small scale/testing. However when there are over 5000 customers searching via a FK dropdown box will be tiresome each time a note is inputted. My question is,…
Crooksey
  • 908
  • 3
  • 11
  • 22
1
vote
1 answer

FormAlchemy drop down list not setting values

All Im trying to do is set the values of a drop down list using a dictionary using formalchemy 1.3.5. The documentation reads: Methods taking an options parameter will accept several ways of specifying those options: an iterable of SQLAlchemy…
RonnyKnoxville
  • 6,166
  • 10
  • 46
  • 75
1
2