[web2py] Re: Putting time in a string

2015-11-05 Thread Garry Smith
Thanks for your reply. The problem was when I put ip = str(request.client), when I took away str(), it the gave me correct ip address. Thanks again. G Smith On Wednesday, 4 November 2015 22:38:17 UTC, Dave S wrote: > > > > On Wednesday, November 4, 2015 at 7:13:16 AM UTC-8, Garry Smith wrot

Re: [web2py] Re: Compute insert-only

2015-11-05 Thread 黄祥
compute field not work when using after insert callback too. e.g. def __after_insert_delivery_order(f, id): db(db.customer.id == f.customer).update(last_delivery_order_net = f.gross - f.tarra) # work #db(db.customer.id == f.customer).update(last_delivery_order_net = f.net) # not work def on_def

[web2py] Re: custom auth table email field set to unique=True accepts non unique values with different case.

2015-11-05 Thread arihant daga
Thank you anthony On Wednesday, November 4, 2015 at 11:09:34 PM UTC+5:30, arihant daga wrote: > > In custom auth table even if email field is set to unique=true, if user > inputs two different values different in case ex.( 'em...@gmail.com' and ' > em...@gmail.com' ) it will accepts both and will

[web2py] enable automatic login after email verification

2015-11-05 Thread arihant daga
I want users to enable automatically login after email verification but not allowing them login right after registration before email verification. Currently i have these settings. auth.settings.registration_requires_verification = True auth.settings.login_after_registration = False auth.settin

Re: [web2py] its possible get mac address?

2015-11-05 Thread Fabiano Almeida
Hi All! Got it. If the server and client are on the same network, including the web2py it is installed on the network server. How to get the mac address by ARP? Thanks again, Fabiano. 2015-11-04 21:40 GMT-02:00 Dave S : > > On Wednesday, November 4, 2015 at 11:58:07 AM UTC-8, Carlos Cesar > C

[web2py] Custom Login is correct like this?

2015-11-05 Thread Alessio Varalta
def user(): """ exposes: http:///[app]/default/user/login http:///[app]/default/user/logout http:///[app]/default/user/register http:///[app]/default/user/profile http:///[app]/default/user/retrieve_password http:///[app]/default/user/change_p

[web2py] Re: Custom Login is correct like this?

2015-11-05 Thread Anthony
response.flash only lasts for the current request, but immediately after setting it, you do a redirect, which results in a new request being sent from the browser. In such a case, you should instead set session.flash, which will be copied into response.flash after the redirect. Also, note that

[web2py] Re: decorator "Or" operator syntax

2015-11-05 Thread Alex Glaros
actually, it might be okay the join in decorator ensures that user ID is in same physical records that are referenced in the URL vars will definitely get a full evaluation before goes to production -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/w

[web2py] Re: Putting time in a string

2015-11-05 Thread Dave S
On Thursday, November 5, 2015 at 1:10:32 AM UTC-8, Garry Smith wrote: > > > Thanks for your reply. > > > The problem was when I put ip = str(request.client), when I took away > str(), it the gave me correct ip address. > > Thanks again. > > G Smith > > >> So you're in good shape! Thanks for the

Re: [web2py] its possible get mac address?

2015-11-05 Thread Dave S
On Thursday, November 5, 2015 at 8:44:43 AM UTC-8, Fabiano Almeida wrote: > > Hi All! > > > Got it. If the server and client are on the same network, including the > web2py it is installed on the network server. How to get the mac address by > ARP? > > Looks like you want to investigate the sca

[web2py] Storing the original filename using grid

2015-11-05 Thread Gael Princivalle
Hello all. Is it possible to store the original filename of an uploaded file in a table using grid for adding a record? The table: db.define_table('memos', Field('code', type='string'), Field('memo_file_name', type='string'), Field('memo_file', 'upload'), auth.signature) Thanks,

[web2py] Re: Storing the original filename using grid

2015-11-05 Thread 黄祥
please check this discussion, falko already point it out, i think in your case, just set a upload type field readable = false and set links in grid with the value like falko describe in that forum. ref: https://groups.google.com/forum/#!topic/web2py/6zLq7HPzTmc best regards, stifan -- Resource

Re: [web2py] Re: Why won't web2py serve my .vcf file?

2015-11-05 Thread tim spear
I think so - Apache I think. I'll double check the details. Ta. On Thu, Nov 5, 2015 at 9:38 PM, Niphlod wrote: > just tried, everything works fine. are you using the default webserver ? > > On Wednesday, November 4, 2015 at 9:58:14 PM UTC+1, tim spear wrote: >> >> I'm trying to let users downloa

[web2py] Re: Why won't web2py serve my .vcf file?

2015-11-05 Thread Niphlod
just tried, everything works fine. are you using the default webserver ? On Wednesday, November 4, 2015 at 9:58:14 PM UTC+1, tim spear wrote: > > I'm trying to let users download a .vcf file (vCard). > > I copied myfile.vcf to the static folder. When I try going to > www.myapp.com/static/myfile.v

Re: [web2py] Re: Why won't web2py serve my .vcf file?

2015-11-05 Thread Anthony
What happens if you run web2py locally with its built-in server? On Thursday, November 5, 2015 at 4:40:47 PM UTC-5, tim spear wrote: > > I think so - Apache I think. I'll double check the details. Ta. > > On Thu, Nov 5, 2015 at 9:38 PM, Niphlod wrote: > >> just tried, everything works fine. are y

[web2py] Re: console.log on page reload?

2015-11-05 Thread Derek
put it in new.html not web2py_ajax On Thursday, October 1, 2015 at 4:54:33 PM UTC-7, Tom Campbell wrote: > > Thank you, Derek, but I'm still flummoxed. I added this new script tag to > web2py_ajax.html: > > console.log('loaded ' + Date.now()) > > But I'm getting this message even when I use LOAD(

[web2py] how to phrase has_permission to include group_id

2015-11-05 Thread Alex Glaros
If I have multiple db.auth_group roles that have identical db.auth_permission.name "eat_chocolate" is there a way to select the correct group for the permission in the decorator? E.g., @auth.requires_permission(group_id, 'eat_chocolate') or do I have to create a lambda that joins them? auth.re

[web2py] Re: how to phrase has_permission to include group_id

2015-11-05 Thread Alex Glaros
never mind, got the concept wrong -- 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 message because you are subscribed to the Google Group

[web2py] Re: object 'DAL' has no attribute 'Field' - After update 2.11.2

2015-11-05 Thread Dan
Hello, I have experienced same issues at PythonAnywhere after doing an upgrade from 2.9 to 2.12. Web site crashed, and I couldn't access the admin interface at PA no more. After doing what Niphlod suggested (thanks !) - web site is now working - but I still cannot access the admin interface. T

[web2py] Scheduler - Worker node heartbeats stop randomly

2015-11-05 Thread Benson Myrtil
Good morning, I am sure this is a noob question but I cant seem to find a solid answer. I have started a worker nodes using the 'python web2py.py -K [app]' command. Everything appears to work fine for a while. My scheduled task need to run once a day but I am noticing that the worker node rando

[web2py] Even after setting routes.py to my app name GideonGeorge, my site doesn't go as expected

2015-11-05 Thread Gideon George
What could be the problem? my site goes to http://www.gideongeorge.com/welcome/default/index when it should just go to the domain root. Please somebody help me out. Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: object 'DAL' has no attribute 'Field' - After update 2.11.2

2015-11-05 Thread Dan
Issue solved by PythonAnywhere guys: Had to copy the files from the old 2.9 version folder to the new 2.12 Web2Py folder and everything works fine: /PAredirect/parameters_443.py /redir/parameters_443.py /parameters_443.py Thanks On Thursday, November 5, 2015 at 8:20:43 PM UTC-5, Dan wrote: >

[web2py] Keeping a webservice up to date.

2015-11-05 Thread Sepehr Mohamadi
Hi! I have a web service that should be update always on my site. I want it to be updated every for example 1 minute. But i don't know how I can use this function in a web2py framework! I mean I need a python module to be resident in memory and run there and update every 1 minute. And every we

[web2py] Re: Scheduler - Worker node heartbeats stop randomly

2015-11-05 Thread Ian Ryder
Where are you running your app? If it's PythonAnywhere they regular restart backend systems so there's no guarantee on any task hanging around for very long. https://help.pythonanywhere.com/pages/LongRunningTasks/ Beyond that we had a lot of similar issues that we couldn't quite put our finger

Re: [web2py] bootstrap3 formstyle checkboxes

2015-11-05 Thread Annet
> That the labels for boolean fields are consistent in appearance with the > labels for other classes of field. > > So, emboldened and on the left. > That's not the way Bootstrap styles a boolean checkbox see the Remember me input for both http://getbootstrap.com/css/#forms-inline and http:/

[web2py] Re: About static files in markmin

2015-11-05 Thread Martin Weissenboeck
One additional question: auth.wiki understands a page with some "@{myfunktion:1,2,3}" calls. And I want to include pictures with something like "[[Description @///static/mypicture.png center]]". How can I create a pdf-file using all the @-features? 2015-11-04 15:57 GMT+01:00 Martin Weissenboeck :