This line:

records = db(auth.settings.table_user==auth.user).select(...)

is invalid because the content of db(...) is not a query. It does not
involve any field.



On Jan 17, 9:28 pm, Rick <sababa.sab...@gmail.com> wrote:
> I found that this line is the error-prone one:
> records =
> db(auth.settings.table_user==auth.user).select(db.day.theauth,
> distinct=True, orderby=db.day.thedate)
> ...I tested the next version too, but it also gave an error:
> records = db(db.day.theauth==auth.user).select(db.day.ALL,
> orderby=db.day.thedate)
> ...The last version worked, but it doesn't fulfill the function I want
> it to have, namely to select records that are associated with the user
> that is logged in:
> records = db().select(db.day.ALL, orderby=db.day.thedate)
> Any ideas?
>
>
>
>
>
>
>
> >On Jan 16, 9:54 pm, Rick <sababa.sab...@gmail.com> wrote:
> > I suppose that the problem is that the "records" list isn't completely
> > returned from the controller file to create.html and that the
> > "thedate" field is lost in that process.
>
> > On Jan 16, 9:32 pm, Rick <sababa.sab...@gmail.com> wrote:
>
> > > Hmmm... strange... the error disappeared, but it was replaced by
> > > another one:
> > > KeyError: 'thedate'
> > > ...and this error arises from the html-table in the create.html -- the
> > > code works when i delete the table.
>
> > > On Jan 16, 8:40 pm, Rick <sababa.sab...@gmail.com> wrote:
>
> > > > Perhaps the previous post was a bit vague. I meant that create.html
> > > > works when it only contains {{=form}}.
>
> > > > On Jan 16, 8:35 pm, Rick <sababa.sab...@gmail.com> wrote:
>
> > > > > Yes, {{=form}} works without the other code.
>
> > > > > On Jan 16, 6:35 pm, Martín Mulone <mulone.mar...@gmail.com> wrote:
>
> > > > > > to test, put only  {{=form}} in create.html remove all the other. 
> > > > > > Now the
> > > > > > error continue?
>
> > > > > > 2011/1/16 Rick <sababa.sab...@gmail.com>
>
> > > > > > > thanks for the comments. I deleted the #. At the beginning of
> > > > > > > create.html there is this code:
> > > > > > > {{import datetime}}
> > > > > > > {{import uuid}}
> > > > > > > {{recording=datetime.date(2000,01,01)}}
> > > > > > > ...but the error remains :(
>
> > > > > > > On Jan 16, 2:13 pm, "Martin.Mulone" <mulone.mar...@gmail.com> 
> > > > > > > wrote:
> > > > > > > > in create.html
>
> > > > > > > > #if recording!=record.thedate:}
>
> > > > > > > > you commented this line but you hasn't commented the pass, the 
> > > > > > > > same to
> > > > > > > > {{#session.uuid=record.uuid}}
> > > > > > > > and what is recording??.
>
> > > > > > --
> > > > > > Pablo Martín Mulone 
> > > > > > (mar...@tecnodoc.com.ar)http://www.tecnodoc.com.ar/
> > > > > > Paraná, Entre Ríos, Argentina (CP 3100).
>
> > > > > > My blog:http://martin.tecnodoc.com.ar
> > > > > > Expert4Solution 
> > > > > > Profile:http://www.experts4solutions.com/e4s/default/expert/6

Reply via email to