Thanks, Leonel! I will try it out tomorrow.
Cheers
Enviado do meu iPhone
Em 8 de mar de 2019, à(s) 19:58, Leonel Câmara
escreveu:
> The simple stuff you talk about should simply work:
>
> 0. backup the database, this is just good practice...
> 1. if you're running the scheduler you should
My be it is an idea for improving the grid by add (yet another) option
to have radio buttons instead of checkboxes
On Saturday, March 9, 2019 at 12:08:50 AM UTC+1, icodk wrote:
>
> I would do it in javascript in the view and simulate radio buttons, which
> means that every time the user is
The grid's checkboxes (and their multiple selection) are not the problem.
The problem is that my origin page has a grid with extra buttons, using the
selectable option. And I wanted one of the buttons (from the selectable
option) to open a view in another browser page.
Can I control the buttons
I would do it in javascript in the view and simulate radio buttons, which
means that every time the user is selecting a checkbox the script will
clear the former selected checkbox. This way you don't have to deal with
informing the user, about multiple selections.
On Friday, March 8, 2019 at
The simple stuff you talk about should simply work:
0. backup the database, this is just good practice...
1. if you're running the scheduler you should stop it until migration is
finished and migrate is disabled
2. update the code making sure migrate is True.
3. visit appadmin to make sure all
Hi everyone,
My app is in production and is hosted at RoseHosting.
I will soon need to create several tables and want to avoid those “auth.user
table has already been created” messages when the app crashes as I insert new
code on, for example, db.py.
I will insert code like this, simple stuff:
The problem is that my origin page has a grid with extra buttons, using the
selectable option.
And that option does not allow using _target or anything similar. It can
only call a function (which is the function on the 1st message).
That function checks if there is only 1 record selected in the
It's sort of possible using response.js = "window.open(url, '_blank')"
however any modern browser will consider this a popup and block it because
it's a window.open that's not coming as a direct result of a click, you can
then move a step forward fighting with the user's browser preferences and
Hello,
I have this function
def check_only_one_selection(ids, destination):
# type: (List[int], str) -> None
"""Check only one selection in grid.
:param ids: List of Ids.
:param destination: Destination page if one selection was made.
"""
if len(ids) > 1:
I'm using Python 3.7.1. Can that explain this strange situation?
I'm calling web2py with the -e command line option to see the errors and
there are none.
sexta-feira, 8 de Março de 2019 às 18:30:48 UTC, Leonel Câmara escreveu:
>
> web2py doesn't do that. This is weird. Both those lines should
web2py doesn't do that. This is weird. Both those lines should give you
errors.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this
Just for testing, I removed pydal.objects.Table from the function header
and changed the line inside the function from
row: pydal.objects.Row = table[rec_id]
to
row: pydal.objects.Table = table[rec_id]
without importing anything from pydal or pydal.objects, anywhere in
controllers, models or
No, I don't import pydal.objects.Row anywhere in my modules, controllers
even in models.
sexta-feira, 8 de Março de 2019 às 17:40:41 UTC, Leonel Câmara escreveu:
>
> Weird because that doesn't work for me if I don't import pydal so I'm
> guessing you have a import pydal.objects.Row somewhere
Note that parent_name should be the actual field name and not the field
itself. In your case parent_name='object_super_object_fk'
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Weird because that doesn't work for me if I don't import pydal so I'm
guessing you have a import pydal.objects.Row somewhere in your models. That
said you can just use DAL.Table and DAL.Row which are imports web2py does
make for you.
--
Resources:
- http://web2py.com
- http://web2py.com/book
The manual’s example uses a single, self-referencing table. What would be the
syntax for joined, parent/child tables?
I get an AttributeError. Not sure if the parent_name formation is the problem
roots = db((db.role_member.id > 0) & (db.role_member.object_super_object_fk
==
Didn't know that, will correct auth.requires_login with auth.is_logged_in.
No I did not import pydal.
If I remove the type specification from the function header it works, even
when I'm also mentioning pydal inside the function in the line
row: pydal.objects.Row = table[rec_id]
which means
Note that requires_login is meant to be used as a decorator, you should be
using auth.is_logged_in()
Did you import pydal?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
Hey Daniel,
we need a bit more details to be able to see what is going on.
We can not see what the ticket text says from the link that you posted.
Please share the full traceback.
Give us a glimbs what you want to achieve and what you have already done.
Which models/functions are doing the main
Anyone?
Em quinta-feira, 28 de fevereiro de 2019 09:42:56 UTC-3, Daniel Guilhermino
escreveu:
>
> Hi,
>
> I've just tried to submit an new application made with web2py and
> integrated with Dialogflow, but the following error was show:
>
>
> Internal errorTicket issued:
>
Hello,
I already opened an issue on Github.
Thanks, but I prefer to stick with the old type syntax
# type: () -> Dict[str, SQLFORM]
solution instead of creating another function.
Best regards,
João Matos
On 08-03-2019 16:45,
In order to determine which functions in a controller file to expose as
actions, web2py uses the following regex (the intention is to identify only
functions that take no arguments and don't start with a double underscore):
'^def\s+(?P_?[a-zA-Z0-9]\w*)\( *\)\s*:'
As you can see, this does not
If I write this function
from typing import Dict
@auth.requires(lambda: (auth.requires_login() and request.env.http_referer
and ('/client' in request.env.http_referer
or '/client/get_approval' in
request.env.http_referer)))
def
If I write this function
@auth.requires(lambda: (auth.requires_login() and request.env.http_referer
and '/client' in request.env.http_referer))
def on_delete(table: pydal.objects.Table, rec_id: str):
"""Grid delete button action.
:param table: Table.
:param
Thanks
On Friday, March 8, 2019 at 2:49:58 PM UTC+1, Anthony wrote:
>
> On Friday, March 8, 2019 at 4:55:02 AM UTC-5, icodk wrote:
>>
>> So if I understand it right, web2py caches compiled application files
>> and do it on the first demand or a source change and never write back to
>>
On Friday, March 8, 2019 at 4:55:02 AM UTC-5, icodk wrote:
>
> So if I understand it right, web2py caches compiled application files and
> do it on the first demand or a source change and never write back to
> storage/disk. If so, Is there any advantage for compiled web2py
> application
Use as_trees
orgchart = db(db.your_table_which_records_have_parents).select().as_trees()
See as_trees documentation
def as_trees(self, parent_name='parent_id', children_name='children',
render=False):
"""
returns the data as list of trees.
:param
So if I understand it right, web2py caches compiled application files and
do it on the first demand or a source change and never write back to
storage/disk. If so, Is there any advantage for compiled web2py
application (except the one time load and compile after web server reset)?
On Friday,
28 matches
Mail list logo