Following along on the moviedemo but attempting to apply the ideas to my own project.
Recently changed my CrudRestController to Declarative and now my TextField is
disabled and I cannot figure out why.
class SqlGreyController(CrudRestController):
model = OptoutEmail
class new_form_type(AddRecordForm):
__model__ = OptoutEmail
email = TextField
class edit_form_type(EditableForm):
__model__ = OptoutEmail
email = TextField
class edit_filler_type(EditFormFiller):
__model__ = OptoutEmail
class table_type(TableBase):
__model__ = OptoutEmail
class table_filler_type(TableFiller):
__model__ = OptoutEmail
Generates this html
<table border="0" cellspacing="0" cellpadding="2">
<tr id="email.container" class="even" title="">
<td class="labelcol">
<label id="email.label" for="email" class="fieldlabel
required">Email</label>
</td>
<td class="fieldcol">
<input type="text" name="email" class="textfield required"
id="email" value="[email protected]" disabled="disabled" />
</td>
</tr><tr id="submit.container" class="odd" title="">
<td class="labelcol">
</td>
<td class="fieldcol">
<input type="submit" class="submitbutton" value="Submit" />
</td>
</tr>
</table>
sqlite3 database
CREATE TABLE "optout_email" (
"email" varchar(255) NOT NULL,
PRIMARY KEY ("email")
);
class OptoutEmail(DeclarativeBase):
__tablename__ = 'optout_email'
email = Column(String(255), nullable=False, primary_key=True)
Any ideas what I'm doing wrong?
--
Bob Tanner <[email protected]> | Phone : 952-943-8700
http://www.real-time.com, Linux, OSX, VMware | Fax : 952-943-8500
Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378
PGP.sig
Description: This is a digitally signed message part

