Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2507 (closed defect: migrated)

Opened 9 years ago

Last modified 8 years ago

Turbogears 2.1b1 tgext.admin Doesn't Handle Boolean Options

Reported by: lionel Owned by:
Priority: normal Milestone: 2.1
Component: TurboGears Version: 2.1b1
Severity: normal Keywords:
Cc:

Description

I'm using tgext.admin with Mako templates and Turbogears v2.1b1.

How can I resolve the issue with Boolean columns not being updated in tgext.admin?

My Unicode fields are updated with no problem, and the "Boolean columns not updating" issue is irrespective of whether or not I specify a default for the Boolean columns.

Here's my model:

# -*- coding: utf-8 -*- 
"""Post model module.""" 
from sqlalchemy import * 
from sqlalchemy.orm import mapper, relation 
from sqlalchemy import Table, ForeignKey, Column 
from sqlalchemy.types import Integer, Unicode, Boolean 
#from sqlalchemy.orm import relation, backref 
from myapp.model import DeclarativeBase, metadata, DBSession 
class Post(DeclarativeBase): 
    __tablename__ = 'posts' 
    id = Column(Integer, primary_key=True) 
    website_id = Column(Integer, ForeignKey('websites.id')) 
    headline = Column(Unicode) 
    body = Column(Unicode) 
    ready = Column(Boolean) 
    is_posted = Column(Boolean) 
    post_num = Column(Integer) 
    def __repr__(self): 
        return '<Post: headline=%r>' % ( 
                self.headline) 
    def __unicode__(self): 
        return self.headline 

Attachments

post.py Download (757 bytes) - added by lionel 9 years ago.

Change History

Changed 9 years ago by lionel

comment:1 Changed 9 years ago by lionel

Confirmed that tgext.admin with Genshi templates and Booleans work with the attached post.py model, whereas Mako templates do not work with Booleans

comment:2 Changed 9 years ago by chrisz

  • Milestone changed from __unclassified__ to 2.1

comment:4 Changed 8 years ago by pedersen

  • Status changed from new to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.