pombreda / formalchemy

Automatically exported from code.google.com/p/formalchemy
MIT License
0 stars 0 forks source link

If column name is `model` getting `raise AttributeError('Do not set field ...')` #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create pylons project with admin controller 
 $ paster create -t pylons_fa issue

2. Create model class as subclass of declarative_base() with column name
`model`

3. Goto http://localhost:5000/admin/Model

What is the expected output? What do you see instead?

 AttributeError: Do not set field attributes manually. Use add() or
configure() instead 

What version of the product are you using? On what operating system?

python       2.5.2
Pylons       0.9.7
SqlAlchemy   0.5.2
FormAlchemy  1.2

Please provide any additional information below.

It happens when `self.model = model` in `rebind` method, 
and self.model from `AttributeField` became to `model.Model`

$ paster shell
>> import formalchemy
>> fs = formalchemy.FieldSet(model.Model)

>> fs.model
<issue.model.Model object at 0x90488ac>

But `fs.model` also must be `AttributeField(model)`...

P.S. Sorry for my bad english. 

Original issue reported on code.google.com by tatarkin...@gmail.com on 21 Jul 2009 at 7:46

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 108 has been merged into this issue.

Original comment by gael.pas...@gmail.com on 18 Aug 2009 at 10:39

GoogleCodeExporter commented 9 years ago
fixed

Original comment by gael.pas...@gmail.com on 25 Sep 2009 at 4:42