On Tuesday, April 25, 2017 at 9:34:48 AM UTC-7, James Holstead wrote:
>
> I have a scheduler.py in my models directory with two functions,
> syncUsers, testAdd
>
> # create scheduler
> myScheduler = Scheduler(db, migrate=False, tasks=dict(myfunc=syncUsers))
>
> #myScheduler = Scheduler(db,
On Tuesday, April 25, 2017 at 12:26:50 PM UTC-4, Rudy wrote:
>
> Hi Anthony,
>
> Thanks for your suggestion, below script alert("heeheehee") only got
> triggered when i moved the cursor in the textbox, edited the date
> -mm-dd manually, then moved the cursor to another field.
>
> after I mod
I have a scheduler.py in my models directory with two functions, syncUsers,
testAdd
# create scheduler
myScheduler = Scheduler(db, migrate=False, tasks=dict(myfunc=syncUsers))
#myScheduler = Scheduler(db, migrate=False, tasks=dict(myfunc=testAdd))
# sync user task once a day
myScheduler.
Hi Anthony,
Thanks for your suggestion, below script alert("heeheehee") only got
triggered when i moved the cursor in the textbox, edited the date
-mm-dd manually, then moved the cursor to another field.
after I modified to .on("input"), alert("xxyyy") only got triggered
when I again
In case .grid() is a requirement and schema is frozen, the best option
would be to make the union in the backend (postgres) with a view (index it
as describe in the SO explain for better performance) and create a db
models for the view in web2py which it can only be selected as it is a
view. I am d
+1
I am eager to see what Massimo's future web2py spin off framework will
offer... I was insecur about web2py future recently as Massimo didn't seems
as active as before, but I guess he focus his efforts over the future
framework which is a great news.
Richard
On Mon, Apr 24, 2017 at 5:02 PM, Ca
Is there a major issue that prevent us to use SQLFORM.grid like
crud.select() where you can pass a query instead of a talbe??
Richard
On Tue, Apr 25, 2017 at 11:45 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:
> Yes, you are right, he can use SQLTABLE or build his grid with helper
> t
Hello
I've just had an idea that came to mind. But I'm unsure of its feasability.
Can a script be made with pytest ( or something similar ) , and with the
'code coverage ' feature, get automatically only the functions that are
being imported and used in models and controllers,
So in produc
Yes, you are right, he can use SQLTABLE or build his grid with helper
though...
Richard
On Tue, Apr 25, 2017 at 11:23 AM, Anthony wrote:
> On Tuesday, April 25, 2017 at 10:39:53 AM UTC-4, Richard wrote:
>>
>> Forgot to mention... If you for some reason you can't refactor your
>> schema... you c
On Tuesday, April 25, 2017 at 10:39:53 AM UTC-4, Richard wrote:
>
> Forgot to mention... If you for some reason you can't refactor your
> schema... you can unionize query in web2py like so :
>
> select_cat = db(db.cat.id>0).select()
>
> select_dog = db(db.dog.id>0).select()
>
> select_cat_and_dog
Forgot to mention... If you for some reason you can't refactor your
schema... you can unionize query in web2py like so :
select_cat = db(db.cat.id>0).select()
select_dog = db(db.dog.id>0).select()
select_cat_and_dog = select_cat | select_dog
Note: You can use & or | they are python binary opera
The approach mentioned in that post regarding checking for
request.vars._export_type seems like the way to go. If you are having
problems, please post your code and the exact errors you are getting.
Anthony
On Monday, April 24, 2017 at 9:36:19 AM UTC-4, Yebach wrote:
>
> Hello
>
> I would like
On Tuesday, April 25, 2017 at 10:10:08 AM UTC-4, A3 wrote:
>
> Maybe you can use:
>
> db.define_table(‘animal’,
>
> Field('name', 'string', length=45),
>
> Field(‘age’, ‘integer’),
>
> Field(‘apt_time’,’datetime’)
>
>
> and then subclass:
>
>
> db.define_table(‘cat’, db.animal)
>
> and
>
> db.defi
I'm struggling to get a basic test app deployed to Google App Engine using
Cloud SQL.
1. I cloned web2py of github two days ago.
2. I created a Google Cloud SQL instance.
3. I created a new sample app called "SQL" using the web2py admin interface.
4. On the new app, I changed the following lin
web2py doesn't have anything built in for this. You could use one of the
many Javascript based rich text editors (Quill, ProseMirror, CKEditor,
TinyMCE, Trix, etc.). From the web2py side, in a controller, you would have
to read the file content and provide it to the editor, and once changes are
On Tuesday, April 25, 2017 at 3:20:23 AM UTC-4, Jim Russell wrote:
>
> I worked around this by setting the wltype field to string and adding
> a requires=IS_IN_SET. This makes the editing page have a dropdown with the
> set members instead of a free-form text field.
>
This is not a great idea if
On Tuesday, April 25, 2017 at 12:18:29 AM UTC-4, Jim Russell wrote:
>
> Hi all.
>
> I'm having an issue with an SQLFORM.gird query. I have a table where one
> of the columns references another table. Here are the table definitions:
>
> db.define_table('osrwhitelistpool',
> Field('id', type='id
Does it get triggered when the field loses focus? How about if you use
.on("input", ...) instead of .on("change", ...)?
Anthony
On Tuesday, April 25, 2017 at 6:01:12 AM UTC-4, Rudy wrote:
>
> Hi there,
>
> I tried to generate a CREATE FORM using below, then in my view, I added a
> script trying
Maybe you can use:
db.define_table(‘animal’,
Field('name', 'string', length=45),
Field(‘age’, ‘integer’),
Field(‘apt_time’,’datetime’)
and then subclass:
db.define_table(‘cat’, db.animal)
and
db.define_table(‘dog’, db.animal)
and then query on db.animal ?
--
Resources:
- http://web2
Hello George,
You don't need to do that (which is called materialized view and it's not
suppose to involve the creation a new table that you need to maintain in
sync :
http://stackoverflow.com/questions/3986366/how-to-create-materialized-views-in-sql-server)...
In MSSQL you will have storeprocedur
If all or most of the fields are the same from one table to the other, why
not simply put everything in a single table with "category" field to
distinguish cats and dogs (create an index on that field to make it faster
to query just cats or just dogs)?
Anthony
On Tuesday, April 25, 2017 at 7:3
I would put the timeout value directly in the JS, as in your second
example. To redirect, just set the value of location:
location = [logout url];
Anthony
On Tuesday, April 25, 2017 at 9:57:31 AM UTC-4, A3 wrote:
>
>
> Anthony your right, I was just looking in the wrong direction.
>
> What abou
On Tuesday, April 25, 2017 at 4:49:41 AM UTC-4, Gael Princivalle wrote:
>
> I can certainly do it finding the file that create this line.
> Someone knows which file is it?
>
> jQuery('#w2p_query_fields').change();jQuery('#w2p_query_panel').slideDown
> ();
>
If you want to take that approach, you c
Anthony your right, I was just looking in the wrong direction.
What about something like:
def index():
timeout = auth.settings.expiration
return dict( timeout=timeout)
or put the variable timeout in the layout directly to simplify.
And in the layout
var timeout = {{=timeout}};
SQLFORM.grid(..., advanced_search=False)
More generally, the "searchable" argument can be a callable that executes a
custom search, and the "search_widget" argument can be a callable that
generates a custom search widget for the UI. With the combination of those
two arguments, you can create wh
Sorry, I missed your reply.
I do not have modules/db.py
I was attempting to mock the definition of 'ldap_auth' in models/db.py
(It's not essential that the definition live there.)
It looks like when the tests/sign_infra.py mock is applied for
"db.ldap_auth", the web2py custom import hook gets
I have a working solution for this.
I created a third table, which reads the rows from each cat and dog table
and then inserts the values as new rows into the new table. That table is
then passed into SQLFORM.grid().
It's not pretty, but it works while I continue to look for a more elegant
sol
Hi there,
I tried to generate a CREATE FORM using below, then in my view, I added a
script trying to change the renew_date when an user changes the start_date
by using .change(function()). jQuery could detect the change if I manually
modified the date in the textbook, but not when I chose a dat
I can certainly do it finding the file that create this line.
Someone knows which file is it?
jQuery('#w2p_query_fields').change();jQuery('#w2p_query_panel').slideDown();
It doesn't matter if it'll delete this slidedown for all the application
grids.
Il giorno lunedì 24 aprile 2017 11:28:03 UT
I worked around this by setting the wltype field to string and adding
a requires=IS_IN_SET. This makes the editing page have a dropdown with the
set members instead of a free-form text field.
So it's working, but it's not the most elegant solution.
--
Resources:
- http://web2py.com
- http://we
30 matches
Mail list logo