This is sort of a python question.
Lets see exactly what this means
query &= db.orders.status == status.
This syntax is a python (not web2py or the DAL) shorthand for:
query = query & (db.orders.status == status)
So really what you want is:
query = db.orders.id_buyer == auth.user_id
query1
I have some basic question regarding forming dynamic queries
As an example, lets say my base query is
query = db.orders.id_buyer == auth.user_id
Now I want to form two different queries like
query &= db.orders.status == status. ===> Should form query1 and want to
store it for later use
AND
for 1st problem, tried to print the value of the field
just curious what SQLFORM.grid() does with this kind of data with
represent, so that it can appears smoothly, while using another it's throw
an error, any idea or hints?
thanks and best regards,
stifan
--
Resources:
- http://web2py.com
Hi, can I use the represent feature (or some alternative) for specify
how some specific data should be exposed in my parse_as_rest() rest api?
Let's say by example, that I have some field wich use uppercase, but for
some reason I need it at lowercase in the rest api.
Greetings.
--
update_or_insert first selects the record (if it exists) and then does the
create/update. I suppose when two requests come in very close to each
other, the second request is checking for the record before the first
request has had a chance to commit the insert. I'm not sure I would call
that a
Hi, I've been recently using lots of tasks scheduled on a server so I had
to use several workers to deal with the queue, currently I'm using 45
workers.
Somewhere between 12 hours after starting the 45 workers, suddenly tasks
start accumulating in the queue and workers are alive (they report a
Hi All,
I have the following update or insert statement in a controller.
db.grades.update_or_insert(
((db.grades.auth_user == student.id) &
(db.grades.assignment == assignment.id)),
auth_user = student.id,
assignment =
Thanks again everyone.
Here is what I came up with for a solution. I really appreciate all the
helpful input.
# find the upcoming birthdays
start_date = request.now.date()
end_date = start_date + relativedelta(months=+1)
this_month = db((db.employee.dob.month() == start_date.month) &
Thanks, I'll work through this and post my code once I get to the office
this morning.
-Jim
On Wed, Oct 4, 2017 at 4:25 AM, Dave S wrote:
>
>
> On Tuesday, October 3, 2017 at 5:08:27 PM UTC-7, Dave S wrote:
>>
>>
>>
>> On Tuesday, October 3, 2017 at 4:48:52 PM UTC-7, Jim
*modules/test_grid.py*
def list(table):
query = (table.is_active == True)
items = current.db(query).select(orderby = ~table.created_on).render()
actions = [
{'is_item_action': lambda item: True, 'url': lambda item:
URL('view', args = [item.id] ), 'icon': 'zoom-in', 'title':
On Thursday, September 28, 2017 at 4:33:27 PM UTC-7, Dave S wrote:
>
>
> [...]
> I did an experiment with going back to http (no-ess) so that I could read
> the frames in tcpdump, and I see that the client is getting the
> Content-Length header in (and it appears to this Mk I eyeball to be
>
On Tuesday, October 3, 2017 at 4:49:22 AM UTC-7, Ramos wrote:
>
> People should use a tool to minimize js and css files.
> Grunt or Gulp for ex...
>
>
Doesn't web2py provide for minimization? It seems to me that I saw that
looking at changes in 2.15.4.
/dps
> 2017-09-29 23:34 GMT+01:00
I think you should show how you're setting up the datatables.net context.
It looks like there is something about how pydal is called from that
context, perhaps something that SQLFORM.grid initializes that is being
missed in the JS setup.
/dps
On Wednesday, October 4, 2017 at 1:42:19 AM
On Tuesday, October 3, 2017 at 5:08:27 PM UTC-7, Dave S wrote:
>
>
>
> On Tuesday, October 3, 2017 at 4:48:52 PM UTC-7, Jim S wrote:
>>
>> I don't think that will do it. The date stored in the database would be
>> 10/15/1980, or 10/21/1993.
>>
>> Those should both show a birthday in the month
*modules/test_field_constructor.py*
represent_reference_0 = lambda value, field: \
A('%s, %s, %s' % (field.address.street, field.address.city,
field.address.country),
_href="http://maps.google.com/maps?f=q=en=%s,+%s,+%s;
% (field.address.street, field.address.city,
Hi,
The controller returns rows from building table via which the dropdown is
populated. When a user selects a building from the dropdown, the address of
the building should be displayed in the paragraph tag. Here is what I have
done so far,
*Controller*
def index():
return
16 matches
Mail list logo