> In my application, we are tracking the techs, but they do not have
> permission to use the app, so they are not in the the auth table.
If that's the case, then this line doesn't make any sense:
rows=db(db.work_order.tech==auth.user.id).select()
That selects the work orders whose "tech
Thank you, worked like a charm!
In my application, we are tracking the techs, but they do not have
permission to use the app, so they are not in the the auth table. I will
keep all of your input in mind as I continue to work in web2py, this is
great info especially for a beginner like me!!
On
>
> *tip: '{{db.executesql('SELECT first_name, last_name FROM tech WHERE id =
> 'row.tech';')}}',*
There are several things wrong with the above. First, you're getting a
syntax error because you've got 'row.tech' in single quotes inside a string
that is also in single quotes. Second, the SQL
I'm creating a dict 'rows' from the controller that uses the view which has
FullCalendar in it.
Here is the controller:
@auth.requires_login()
def mycal():
rows=db(db.work_order.tech==auth.user.id).select()
return dict(rows=rows)
db.work_order has a 'tech' column, which i'm sure you can
db(db.tech.id==row.tech).select(db.tech.first_name, db.tech.last_name)
The above returns a Rows object. When you do {{=rows_object}} in a view, it
gets serialzied into HTML via SQLTABLE. If you want to extract the first
and last names from just a single row, then you'll have to do so explicitly.
5 matches
Mail list logo