Re: questions

"Jonathan Ellis" <[email protected]> Fri, 13 Oct 2006 07:46:43 -0700
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Try <%= day %> to see if it's a sequence before using it in the f:select

just add ", distinct=True" to your select args to perform "select
distinct," although I would guess that something's wrong with your model
if days in the timetable are not already unique :)

On Fri, 13 Oct 2006 11:48:07 +0100, "Mary Jane Boholst"
<[email protected]> said:
> I keep 
> getting an error when I try to use the <f:select> tag with/ data="[d.day 
> for d in day]"/ where 
> /day=db.timetable.select(order_by=[db.timetable.c.day])/.  The error is 
> TypeError:unpack non-sequence. Any help with why this is not working 
> would be useful. Also is there a way of doing the sql query "select 
> distinct day from timetable;" in spyce/sqlalchemy?
> Thanks for all your help.
> MJ
> 
> Jonathan Ellis wrote:
> > On Tue, 19 Sep 2006 15:25:33 +0100, "Mary Jane Boholst"
> > <[email protected]> said:
> >   
> >> Hello again,
> >> I am currently attempting to develop a web interface linked to a 
> >> database and was wondering if anyone knew how I could display the 
> >> contents of a table or part table in a database as a table in a web 
> >> page. Failing that does anyone know of somewhere where I could find an 
> >> example?
> >>     
> >
> > get a list of data from the db, and display it with spy:table or a
> > manual for loop.
> >
> >   
> >> Also is there a way of creating drop down lists using a database 
> >> connection to populate the contents of the drop down menu?
> >>     
> >
> > same things, only with f:select.
> >
> > it is almost the same as using spy:ul as shown over here:
> > http://spyce.sourceforge.net/docs/whats-new-2-1.html
> >
> > -Jonathan
> >   
-- 
C++ is history repeated as tragedy. Java is history repeated as farce.  --Scott McKay


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642