perhaps an example can speak thousand words :
e.g.
def login_onfail(form):
email = request.vars.email
row = db((db.auth_user.email == email ) ).select().first()
if row is not None:
db.auth_event.insert(time_stamp = request.now,
client_ip = request.client,
user_id = row.id,
origin = '%s/%s' % (re
On Monday, May 23, 2016 at 5:05:59 PM UTC-7, 黄祥 wrote:
>
> Does it work to import locale in the module instead of in the view?
>>
>
> import python module doesn't work in web2py modules, so it must redefine
> again (e.g. locale, datetime)
>
Importing datetime in a module called by a scheduler t
As you have observed, it is not documented. If you're asking whether it is
supported, yes -- I think the lack of documentation is just an oversight.
Anthony
On Monday, May 23, 2016 at 7:40:58 PM UTC-4, Antonio Salazar wrote:
>
>
> I'm implementing a failed login cooldown timer using:
> auth.set
>
> Does it work to import locale in the module instead of in the view?
>
import python module doesn't work in web2py modules, so it must redefine
again (e.g. locale, datetime)
>
> Modules do not get the complete global environment from the model or
> controller that calls them
> (per reques
I'm implementing a failed login cooldown timer usin:
auth.settings.login_onfail = lambda: ...
Searching here it seems as the recommended approach, but the callback is
not mentioned in the manual. Is it a documented feature?
P.S.
The manual only mentions these login callbacks:
auth.settings.lo
On Monday, May 23, 2016 at 3:01:14 PM UTC-7, 黄祥 wrote:
> *my conclusion :*
> - python locale module when used by scheduler must redefine it again in
> views
>
Does it work to import locale in the module instead of in the view?
Modules do not get the complete global environment from the model
in web2py book, i think we can put template using response.render in any
place in views.
*ref:*
http://web2py.com/books/default/chapter/29/08/emails-and-sms?search=response.render#Using-the-template-system-to-generate-messages
*the evidence fact i got :*
- mail() with response.render() that execu
It seems to work now my routes.py had no default application. I still need
to figure out how to route the other sites but new day new luck. thanks Jim
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google
On Monday, May 23, 2016 at 9:14:57 AM UTC-7, BlueShadow wrote:
>
> there were a couple files assigned to root^^ chown to www-data and it
> worked^^
>
>
Always good to hear about a simple fix!
/dps
> On Sunday, May 22, 2016 at 2:28:38 PM UTC+2, BlueShadow wrote:
>>
>> Hi,
>> Something is very
On Saturday, May 21, 2016 at 12:08:14 PM UTC-7, Anthony wrote:
>
> Just to be clear, the traceback is from the view?
>
It looks like the error involves a* mail template* that happens to be in a
subdirectory of application/views.
I can't read the traceback elsethread, not knowing enough about
On Saturday, May 21, 2016 at 1:28:20 AM UTC-7, 黄祥 wrote:
>
> is scheduler can use python modules?
>
Certainly. In one of my scheduled tasks, I import os.path, datetime, sys,
pysftp, and time.
And this is done in a module. The "outer" procedure in the model imports
datetime, the module, and c
So what for problem I have had earlier? I don't know.
I have tested today and it works.
Made I some mistake? Or something has changed in newer Web2py versions?
Great ! Great ! Proper sorting in SQLite smartgrid now works.
I do this in model (to be sure it run always, which is most important if I
Have you looked at /var/log/nginx/error.log?
-Jim
On Monday, May 23, 2016 at 11:54:31 AM UTC-5, BlueShadow wrote:
>
> Os: ubuntu 16.04. Webserver: Nginx url: www.movie-alarm.de
> Am 23.05.2016 18:52 schrieb "Jim Steil" >:
>
>> What OS?
>>
>> On Mon, May 23, 2016 at 11:52 AM, Jim Steil > > wrote:
Os: ubuntu 16.04. Webserver: Nginx url: www.movie-alarm.de
Am 23.05.2016 18:52 schrieb "Jim Steil" :
> What OS?
>
> On Mon, May 23, 2016 at 11:52 AM, Jim Steil wrote:
>
>> What webserver, and what URL are you accessing?
>>
>> On Mon, May 23, 2016 at 11:45 AM, Jim Steil wrote:
>>
>>> And, what is
What OS?
On Mon, May 23, 2016 at 11:52 AM, Jim Steil wrote:
> What webserver, and what URL are you accessing?
>
> On Mon, May 23, 2016 at 11:45 AM, Jim Steil wrote:
>
>> And, what is the error?
>>
>> On Mon, May 23, 2016 at 11:33 AM, BlueShadow
>> wrote:
>>
>>> #!/usr/bin/python
>>> # -*- codi
What webserver, and what URL are you accessing?
On Mon, May 23, 2016 at 11:45 AM, Jim Steil wrote:
> And, what is the error?
>
> On Mon, May 23, 2016 at 11:33 AM, BlueShadow
> wrote:
>
>> #!/usr/bin/python
>> # -*- coding: utf-8 -*-
>>
>>
>> routers = dict(
>> BASE = dict(
>> domains =
like I said an internal server error so I guess the error is before web2py?
On Mon, May 23, 2016 at 6:45 PM, Jim Steil wrote:
> And, what is the error?
>
> On Mon, May 23, 2016 at 11:33 AM, BlueShadow
> wrote:
>
>> #!/usr/bin/python
>> # -*- coding: utf-8 -*-
>>
>>
>> routers = dict(
>> BASE
And, what is the error?
On Mon, May 23, 2016 at 11:33 AM, BlueShadow wrote:
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
>
>
> routers = dict(
> BASE = dict(
> domains = {
> 'domain.com' : 'App',
> 'www.domain.com' : 'App',
> '111.111.111.111/test' : 'test
#!/usr/bin/python
# -*- coding: utf-8 -*-
routers = dict(
BASE = dict(
domains = {
'domain.com' : 'App',
'www.domain.com' : 'App',
'111.111.111.111/test' : 'test',
}
),
App = dict(
root_static=['BingSiteAuth.xml','googlea0df30fe6baf4df4.html',
'
Can you post the routes.py that is not working?
-Jim
On Monday, May 23, 2016 at 11:20:41 AM UTC-5, BlueShadow wrote:
>
> I reinstalled pretty much everything on my Server new OS newest web2py ...
> and got my application back and running :-) but web2py uses still the
> default routes.py.
> whe
I reinstalled pretty much everything on my Server new OS newest web2py ...
and got my application back and running :-) but web2py uses still the
default routes.py.
when I copied my old routes.py to the web2py root I got an internal server
error. I thought well lets use the example file copied it
there were a couple files assigned to root^^ chown to www-data and it
worked^^
On Sunday, May 22, 2016 at 2:28:38 PM UTC+2, BlueShadow wrote:
>
> Hi,
> Something is very wrong with my web2py. I finally got the newest verion
> (2.14.6 nginx/1.4.6, Python 2.7.6 Ubuntu 16.04) on my production serv
mailgun works fine. it's free under a certain quota
https://www.mailgun.com/
--
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 bec
No worries!
For our app, no - the main thing being the consoles disappearing every day
or two...no good for running background services. We now have our own AWS
servers, took a bit of effort but it's a thing of beauty once it's all in
place :) Don't get me wrong, PythonAnywhere is fantastic - s
Thanks for the quick response! You still using pythonanywhere?
On Monday, May 23, 2016 at 10:12:49 AM UTC-4, Ian Ryder wrote:
> Hi Andre, yes, I did indeed write my own - there's a lot in the built in
> one we just didn't need and we really needed to be able to see everything
> that was happen
Hi Andre, yes, I did indeed write my own - there's a lot in the built in
one we just didn't need and we really needed to be able to see everything
that was happening.
I don't see the issue too often now and we have processes that have run for
a month without issue...from memory I think the main
Hi Ian - I'm running into the same issue as you. Do you know the root cause
of the error? Did you end up creating your own scheduling handler?
-Andre
On Thursday, February 5, 2015 at 5:55:04 AM UTC-5, Ian Ryder wrote:
> Think it is pretty similar to this - we have 3 databases open. Seems to
>
not sure what do you need, do you mean the smtp service? i think you could
use your isp smtp or smtp from your domain hosting. i've seen in the other
post that gmail is fine if you don't activate two factor authentification
in gmail (lionel point it up, if i'm not mistake)
best regards,
stifan
Thanks Anthony for your suggestion! Works just fine :)
For anyone looking at a similar problem, here's what I've done now.
form = SQLFORM.factory(
Field('appStart','datetime',label='App-Period Start Time'),
Field('appEnd','datetime',label='App-Period End Time')
I used to use gmail. Had a lot of struggle and one fine day it started
working. Now again it doesn't work. I get no emails!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (R
30 matches
Mail list logo