[web2py] Re: problem with start_time of the scheduler

2016-10-15 Thread Martin Weissenboeck
Thank you, but start_time has a value. start_time is a paramter of the surrounding function. I have tested it with task_name = task_name + str(start_time) and therefore I have written start_time != None 2016-10-15 19:59 GMT+02:00 Dave S : > > > On Saturday, October 15, 2016 at 6:27:33 AM UTC-7, m

[web2py] Re: Display uploaded file

2016-10-15 Thread Jaimee S
You're a genius, man. Thanks. Is there any way to bypass the download function? It slows down my site if I'm downloading each picture of each user BTW, I appreciate your efforts! I see you on every board. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://githu

[web2py] How to cleanly pass FPDF output object to os Download/Save dialogue box

2016-10-15 Thread Peter
I have this code that doesn't work too well... import os import sys pdf = receipt_PDF() pdf.add_page() rcpt_filename = "RCPT_%s_%s.pdf" % (session.rcpt_number, session.rcpt_recipient) rcpt_filename = rcpt_filename.replace( ' ', '_' ) if sys.platform.startswith( "linux" ) : os.system( "xdg-o

[web2py] Re: web2py + cordova + APIs

2016-10-15 Thread Massimo Di Pierro
copy it from your welcome app. On Saturday, 15 October 2016 20:17:37 UTC-5, pbreit wrote: > > Interesting. > > I'm getting a "Config file not found" ("private/appconfig.ini" missing). > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: web2py + cordova + APIs

2016-10-15 Thread pbreit
Interesting. I'm getting a "Config file not found" ("private/appconfig.ini" missing). -- 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 m

[web2py] Re: Display uploaded file

2016-10-15 Thread Anthony
> {{for b in row:}} Not sure what your real code looks like, but above should be "{{=URL(...)}}" (you are missing the "="). Also missing the closing of the img tag. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source c

[web2py] Re: how to remove column header

2016-10-15 Thread Anthony
You can do a loop in the view -- just prepare a data structure in the controller and pass it to the view (i.e., move the queries to the controller). Actually, you can probably just do a single query including all items in taxonomy_set (and orderby that field) -- then just send the entire Rows o

[web2py] Re: how to remove column header

2016-10-15 Thread Alex Glaros
thanks Massimo and Anthony it's working now but don't know how to get around writing a loop in the view. Can you please explain in general principles how to get loop written in controller to display in view? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://g

[web2py] Re: Display uploaded file

2016-10-15 Thread Jaimee S
Thanks for replying, I should probably clarify more. The dots are just my shorthand way of indicating that the code is the same in that spot and the only thing that changed was what I typed out the following time. The b in the for loop is just a variable that indicates the same value as your

[web2py] Re: A new and easier way to test your apps

2016-10-15 Thread 黄祥
perhaps its about the email value : ho...@web2py.com change it into another correct email format best regards, stifan -- 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

[web2py] Dynamically loading the answers to faq questions as a response to a click event.

2016-10-15 Thread Terrence Monroe
Hello, I would like to build upon a previous discussion about creating a FAQ in web2py: https://groups.google.com/forum/#!msg/web2py/gzCnwBIlkeM/GJsXi0puHMYJ;context-place=forum/web2py I like the data model discussed there: db.define_table('faq', Field('question','string'), Field('answer','s

[web2py] Re: Display uploaded file

2016-10-15 Thread Anthony
On Saturday, October 15, 2016 at 3:20:41 AM UTC-4, Jaimee S wrote: > > > > #displays broken image > > #other failed methods > {{for b in row:}}{{pass}} > Hard to say what's wrong here, as we don't know what "b" is. Also, what's in the "..." may be important -- "args" should be an argument of th

[web2py] Re: how to remove column header

2016-10-15 Thread Anthony
On Friday, October 14, 2016 at 9:35:51 PM UTC-4, Alex Glaros wrote: > > how to supress field header > >{{taxonomy_set = ['super_city_3', 'super_city_2', 'super_city_1', > 'city', 'sub_city_1', 'sub_city_2', 'sub_city_3']}} > {{for r in taxonomy_set:}} > {{db.geo_political_generic_f

[web2py] Re: Difference between migrate = False or migrate_enabled = False

2016-10-15 Thread Anthony
On Saturday, October 15, 2016 at 12:07:34 PM UTC-4, Alfonso Serra wrote: > > Yes Stifan, but isnt the same thing? > > migrate = False disables migration for all tables > No, it sets the *default* migration behavior for all tables -- you can override the default for any given table by setting its

Re: [web2py] Re: web2py + cordova + APIs

2016-10-15 Thread samuel bonill
ok, thanks... 2016-10-15 12:15 GMT-05:00 Massimo Di Pierro : > we have that. in fact we have two ways, normal token and jwt. I will post > more details. > > On Friday, 14 October 2016 19:05:08 UTC-5, samuel bonill wrote: >> >> Hi massimo, I like a lot APIMaker, i would like collaborate in this >>

[web2py] Re: problem with start_time of the scheduler

2016-10-15 Thread Dave S
On Saturday, October 15, 2016 at 6:27:33 AM UTC-7, mweissen wrote: > > It seems that the start_time parameter in a scheduler_task record does not > work correctly. > > For example: > > I add a record to scheduler_task which should start the function > "smsEmailAussenden" (means "send the email"

[web2py] Re: how to remove column header

2016-10-15 Thread Massimo Di Pierro
I do not full understand. You select only the column db.geo_political_ generic_fields_lookup.taxonomy_column_fk what d you want you want to remove it? You want to remove the header only? You could replace {{=geoFieldName}} with {{for row in geoFieldName:}}{{=row.taxonomy_column_fk }}{{pass}} On

[web2py] Re: web2py + cordova + APIs

2016-10-15 Thread Massimo Di Pierro
we have that. in fact we have two ways, normal token and jwt. I will post more details. On Friday, 14 October 2016 19:05:08 UTC-5, samuel bonill wrote: > > Hi massimo, I like a lot APIMaker, i would like collaborate in this > project... i'm thinking implements authentication on token based > a

[web2py] Re: A new and easier way to test your apps

2016-10-15 Thread Pierre
Hi, i am testing my app with Massimo's webclient. I did some requests and everything went fine but I can't login users either with their username or email I use the same code as below : I get a client.status=200 but the assert Welcome fails ? I printed client.text and searched manually for the '

[web2py] Re: Difference between migrate = False or migrate_enabled = False

2016-10-15 Thread Alfonso Serra
Yes Stifan, but isnt the same thing? migrate = False disables migration for all tables migrate_enabled = False disables all migrations? Are there migrations not meant for tables? Thats the question. If they are the same thing why the need of 2 parameters? Is a legacy feature? Thanks -- Res

Re: [web2py] Re: Referencing another table

2016-10-15 Thread Val K
If you want to have strict DB-constraints, you can: db.define_table('barcode', Field('code', type='string', unique=True, notnull=True), # *consider just 'code', not 'barcode'* - it's necessary to prevent possible hard-to-catch bugs during SQLFORMs processing

[web2py] Re: Difference between migrate = False or migrate_enabled = False

2016-10-15 Thread 黄祥
taken from the book : migrate = True sets default migrate behavior for all tables fake_migrate = False sets default fake_migrate behavior for all tables migrate_enabled = True If set to False disables ALL migrations fake_migrate_all = False If set to True fake migrates ALL tables ref: http://we

Re: [web2py] Re: Referencing another table

2016-10-15 Thread 黄祥
i think it's can be done by record representation format, either in table format or in requires validation format representation. (the table bursary_entries just save the id for that refered to bursary_users, but it will shown the barcode, if you set the format correctly either in table format

Re: [web2py] Re: Referencing another table

2016-10-15 Thread vValentine1337
Ah okay. It should only be done via. A validated form anyway but I see the potential risk. Is the other option to set the barcode as the PK in my bursary_users table and 'reference' it? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (S

[web2py] Difference between migrate = False or migrate_enabled = False

2016-10-15 Thread Alfonso Serra
Yes what's the difference between migrate = False and migrate_enabled = False on a DAL declaration? Since all my mysql tables are defined and they need some extra UNIQUE indexes (that are removed automatically if migrate = True). What would be the way to disable migrations in general and only e

[web2py] problem with start_time of the scheduler

2016-10-15 Thread Martin Weissenboeck
It seems that the start_time parameter in a scheduler_task record does not work correctly. For example: I add a record to scheduler_task which should start the function "smsEmailAussenden" (means "send the email") at 16:00 I expect the email to be sended at 16:00, but it starts immediately. At 1

[web2py] Re: Referencing another table

2016-10-15 Thread Val K
Keep in mind, that 'reference ' - realized at DB-level as FK-constraint, web2py allows to define reference to PK only (you try to refer to not-PK field) requires=... - just web2py validator and has no effect on underlying DB and there isn't an autovalidation of DB manipulation from code

[web2py] Re: Referencing another table

2016-10-15 Thread James Booth
Okay, that seems to work fine, I guess I just tried to implement into incorrectly. Thanks for your help! -- 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) ---

[web2py] Re: Referencing another table

2016-10-15 Thread James Booth
How can I make the 'barcode' field in bursary_entries reference/depend upon a 'barcode' entry in bursary_users? Do I just have to alter my field to: type='text', requires=IS_IN_DB(db,'bursary_users.barcode) I was trying to make sense of what was needed here and I thought 'requires' was the best

[web2py] Display uploaded file

2016-10-15 Thread Jaimee S
Hello all, I've been trying relentlessly to display a photo that is connected to a user. I've tried the download function a thousand ways and am slowly running out of Google search terms. Here is what I've tried: auth.settings.extra_fields[auth.settings.table_user_name]= [Field('picture','up