[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread Niphlod
how do you run the web2py application ? utc times match perfectly, it's 
just the timezone that is not matching... environmental variables ?!

On Friday, March 25, 2016 at 7:24:31 AM UTC+1, mfarees...@gmail.com wrote:
>
> Hi.
> I am in Asia/Karachi timezone and am testing my application for US/Pacific 
> timezone. Here is the scenario:
> The *system time* that I've set is,
> 2016-03-24 18:02:58
> and the timezone is US/Pacific
>
> When I use the *Python interpreter* to print the datetime, I get 
> >>> print datetime.datetime.now()
> 2016-03-24 18:02:58.814000
> >>> print datetime.datetime.utcnow()
> 2016-03-25 01:02:58.814000
>
> Which is correct. But when I use my *web2py application* to print the 
> same I get,
> print datetime.datetime.now()   # 2016-03-25 06:02:58.814000
> print datetime.datetime.utcnow()  # 2016-03-25 01:02:58.814000
>
> So, the problem is that the two datetime.now() results do not match. For 
> some reason, the application is returning a datetime which is 12 hours 
> ahead of what it should actually return. I'm facing this issue on a Windows 
> machine; but on Linux Mint, I'm getting correct results.
> This seems like its a tricky one, who's up for a challenge? : )
>

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread mfarees . knysys
I start the web2py server using this command
python web2py.py
The I go to localhost:8000/app_name
I haven't set any timezone value in the environment variable, so I guess it 
should be default. However, I have set the system time and timezone from 
the bottom right clock.

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Get list of user groups

2016-03-25 Thread Alex
import os
from gluon import recfile

session_filename = recfile.generate(session_id)
full_filename = os.path.join(request.folder, 'sessions/', session_filename)

that's how I get the filename from a session id. Keep in mind that a user 
can have multiple sessions (logged in from different devices, browsers), so 
storing the session_id in db.auth_user might not be sufficient.

In case sessions are stored in the database: would it be possible to add a 
field user_id to this table? then it would be really easy to get all the 
sessions from a specific user. I could not manage to enhance the 
web2py_session table with a user_id.

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] new Starter app (alternative to Welcome app)

2016-03-25 Thread António Ramos
This starter is sooo cool.
Its was time we had something like this.



2016-03-24 19:51 GMT+00:00 Ron Chatterjee :

> Its all good. Just asked.
>
>
> On Thursday, March 24, 2016 at 3:33:00 PM UTC-4, Michael Beller wrote:
>>
>> No Avatar field yet!  It's hardcoded in the template.  It should be easy
>> to add a custom field to the auth_user table following these instructions:
>>
>> http://web2py.com/books/default/chapter/29/09/access-control?search=auth_user#Customizing-Auth
>>
>> Then you can upload an avatar using the user profile page.
>>
>> I haven't done this with images but it should be straight forward (it's
>> on my todo list!)
>>
>> You can also designate a dedicated folder for the avatar uploads so
>> they're not commingled with other upload files ...
>>
>> http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=upload#SQLFORM-and-uploads
>>
>> On Thursday, March 24, 2016 at 3:03:41 PM UTC-4, Ron Chatterjee wrote:
>>>
>>> I am sorry, I was having some problem downloading the latest version so
>>> everything is good. Quick question Michael, how does someone change the
>>> profile picture? There is a avatar field?
>>>
>>> On Thursday, March 24, 2016 at 11:56:27 AM UTC-4, Michael Beller wrote:

 The appconfig in 2.13 has a problem with strings separated by comma's
 in the appconfig.ini file.  Starter app uses 2.14.1

 You can either install 2.14.1 or just change ...

 line 34 in initialize.py:
 for group in myconf.get('admin_user.auth_groups'):

 could replace with
 for group in ['Admin', 'Customer Service', 'Operations']:

 or just change the function to create the Admin group which is all
 that's needed.



 On Thu, Mar 24, 2016 at 11:20 AM, Ron Chatterjee 
 wrote:

> Not sure its ready to be posted. I just downloaded the app and I don't
> see any initialization. My experience...it seems have some issues still
> (see the attached pic) . When I tried to register, I get this error:
>
>
> Traceback *(*most recent call last
> *):   *File "…\web2py\gluon\restricted.py"*, *line 227*, in *
> restricted
> *exec *ccode *in *environment
>   File" …applications/starter/controllers/default.py"
> *,
> *line 91*, in <*module
> *>   *File "…web2py\gluon\globals.py"*, *line 412
> *, in  self.*_caller *= lambda *f*: *f
> *()   *File …/starter/controllers/default.py"
> *,
> *line 70*, in *user
> *return *dict*(*form*=*auth
> *())   *File "…web2py\gluon\tools.py"*, *line 1923*, in *__call__
> *return *getattr*(self, *args*[*0
> *])()   *File "…\tools.py"*, *line 3375*, in *register
> *self.*login_user*(*user
> *)   *File "…web2py\gluon\tools.py"*, *line 2630*, in *login_user
> user *= *Row*(*user
> *)   *File "…\helpers\classes.py"*, *line 18*, in *__init__
> *return self.*__dict__*.*__init__*(**args*, ***kwargs
> *) *TypeError*: *'NoneType' object *is not *iterable
>
> Using 2.13.4 (which has a flash bar rash that just don't go away).
>
>
>
> On Thursday, March 24, 2016 at 10:38:35 AM UTC-4, Michael Beller wrote:
>>
>> I commonly create a user (usually my email) and an Admin group and
>> then add myself to the Admin group.  I have logic in the Starter app 
>> based
>> on the Admin group.  I usually have other groups such as Operations and
>> Customer Service (I tend to build enterprise 'line of business' apps).
>> Since I frequently clean out the database during initial development, I
>> just created an initialization function that automatically adds an 
>> initial
>> set of test users, groups, and memberships so I don't have to do it
>> manually,   The Initialization function also calls a function that
>> automatically populates tables with test data (using the Populate 
>> function)
>> that is helpful for quick demos during prototyping and user demos.  You 
>> can
>> modify the routines to meet your needs - it's just something I always end
>> up creating so I put it in my scaffold app.
>>
>> On Thu, Mar 24, 2016 at 9:13 AM,  wrote:
>>
>>> This may be little preliminary but what you mean by "Admin user and
>>> auth_groups" setup and how? I don't recall anything to set up with the
>>> welcome app. It worked the first time straight out of the box.
>>>
>>>
>>> On Thursday, March 24, 2016 at 8:56:22 AM UTC-4, Ron Chatterjee
>>> wrote:

 I am looking at this link:

 https://almsaeedstudio.com/themes/AdminLTE/documentation/index.html.
 Is that widget/plugin that comes with that bootstrap? Michael, you 
 familiar
 with that?

 It has

[web2py] Re: web2py 2.14.1 is OUT

2016-03-25 Thread Ramkrishan Bhatt
Hi Massimo, 

Yeah its awesome change set i can see, specially for GAE support. very 
Thanks to Simone (niphlod), Richard, and Leonel for contribution. Very 
congrats to all :) .
Now i am not using web2py much but always kept eyes on update in groups 
post and github logs. 

Congrats once again to all web2py developer :)

Thanks and regards
Ramkrishan Bhatt

On Thursday, 24 March 2016 23:06:54 UTC+5:30, Massimo Di Pierro wrote:
>
> http://web2py.com/
>
> First of all many many thanks to Simone (niphlod), Richard, and Leonel. 
> Most of the work is theirs.
>
> It is important that you upgrade because we fixed some serious security 
> bugs that may leak your admin password (if you use rocket and expose the 
> old example app).
>
> We fixed many many bug and in particular everything should work fine on 
> GAE now, including Datastore and Cloud SQL.
>
> CHANGELOG
>
> - fixed two major security issues that caused the examples app to leak 
> information
>
> - new Auth(…,host_names=[…]) to prevent host header injection
>
> - improved scheduler
>
> - pep8 enhancements
>
> - many bug fixes
>
> - restored GAE support that was broken in 2.13.*
>
> - improved fabfile for deployment
>
> - refactored examples with stupid.css
>
> - new JWT implementation (experimental)
>
> - new gluon.contrib.redis_scheduler
>
> - myconf.get
>
> - LDAP groups (experimental)
>
> - .flash -> .w2p_flash
>
> - Updated feedparser.py 5.2.1
>
> - Updated jQuery 1.12.2
>
> - welcome app now checks for version number
>
> - Redis improvements.
>
>
> BEFORE:
>
> from gluon.contrib.redis_cache import RedisCache
>
> cache.redis = RedisCache('localhost:6379',db=None, debug=True)
>
>
> NOW:
>
> from gluon.contrib.redis_utils import RConn
>
> from gluon.contrib.redis_cache import RedisCache
>
> rconn = RConn()
>
> # or RConn(host='localhost', port=6379,
>
> # db=0, password=None, socket_timeout=None,
>
> # socket_connect_timeout=None, .)
>
> # exactly as a redis.StrictRedis instance
>
> cache.redis = RedisCache(redis_conn=rconn, debug=True)
>
> BEFORE:
>
> from gluon.contrib.redis_session import RedisSession
>
> sessiondb = RedisSession('localhost:6379',db=0, session_expiry=False)
>
> session.connect(request, response, db = sessiondb)
>
>
> NOW:
>
> from gluon.contrib.redis_utils import RConn
>
> from gluon.contrib.redis_session import RedisSession
>
> rconn = RConn()
>
> sessiondb = RedisSession(redis_conn=rconn, session_expiry=False)
>
> session.connect(request, response, db = sessiondb)
>

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread Leonel Câmara
When I use the *Python interpreter* to print the datetime, I get 
>>> print datetime.datetime.now()
2016-03-24 18:02:58.814000
>>> print datetime.datetime.utcnow()
2016-03-25 01:02:58.814000

How is this correct if your timezone is not UTC?

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread mfarees . knysys
Pacific Time (US & Canada (UTC -08:00) is the selected timezone. When it's 
6:00 PM in LA, its 1:00 AM (of the next day) UTC. There's a 7 hour 
difference between LA and UTC (since DayLight Saving is active right now). 
Hence, the results quoted are correct.

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Online manual like the web2py book

2016-03-25 Thread Gael Princivalle
Hello to everybody.

I have to build in a app an online manual for electronic control cards like 
Arduino, but dedicated to Hydraulic applications like aerial platforms, 
cranes.
As the product have a lot of functions and potentially applications, manual 
will have something like 500 pages.

Perhaps the way that the online web2py book could be a solution.
http://web2py.com/book

Someones can tell me how is it made?
Model/Controller/Views?

Thanks, regards.


-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread Leonel Câmara
But that shows a 9 hour difference.

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread mfarees . knysys
No, it doesn't. 6:00 PM + 7 hrs = 1:00 AM (of next day).

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Login form does not present error msg

2016-03-25 Thread Yebach
Hello

I am having a problem with my login form

I have a login form on my index page.

If a user enters wrong pass there is no error msg only page is reloaded

Any suggestion? Thank you

My controller:

   
def index():


   # If user is not logged in
if not auth.is_logged_in():
auth.settings.formstyle='bootstrap'
db.auth_user.email.widget = lambda f,v: 
SQLFORM.widgets.string.widget(f, v, _placeholder='Enter your email address')
db.auth_user.password.widget = lambda f,v: 
SQLFORM.widgets.password.widget(f, v, _placeholder='Enter your password')
return dict(formLogin = auth(), loggedIn = False)
   
   

"brez sc_menu_data ker ga ne rabmo"
scripts = db((db.auth_user.id == auth.user_id) & 
(db.scripts.sc_organization == db.auth_user.organization) 
).select(db.scripts.id, db.scripts.sc_status, db.scripts.sc_cal_start, 
db.scripts.sc_cal_end, db.scripts.sc_name, db.scripts.sc_modified,
db.scripts.sc_verification_date, orderby = db.scripts.id).as_list()


for script in scripts:
   sa_start = db(db.script_activity.sa_id_script == 
script['id']).select(db.script_activity.sa_start, orderby = 
~db.script_activity.sa_start, limitby = (0, 1)).as_list()
   script['sa_start'] = sa_start[0]['sa_start'] if sa_start else None

##pogledamo še kakšen je status userja (free user itd)
user = auth.user_id
#userRegDate = db(db.auth_user.id == 
user).select(db.auth_user.regdate).first()["regdate"]
userFreeEndDate = db(db.accounting.ac_organization == 
user).select(db.accounting.ac_end_date).first()["ac_end_date"]
email = db(db.auth_user.id == 
user).select(db.auth_user.email).first()["email"]
org = db(db.auth_user.id == 
user).select(db.auth_user.organization).first()["organization"]

userStatus = db(db.accounting.ac_organization == 
org).select(db.accounting.ac_customer,db.accounting.ac_run_status).first()
userType = userStatus.ac_customer
runStatus = userStatus.ac_run_status
today =  datetime.datetime.now()


če je trenutni datum manjši od datuma registracije + 30 dni pol je user 
free user
Drugače se prestavi runStatus na 1 in user ne more več računat, ac_end_date 
se pa poveča za 7 dni"""
"userFreeEndDate je datum registracije + 30 dni, ki se ga prebere iz baze"

"newUserRegEndDate je datum registracije + 30 dni, ki se zračuna že na 
začetku + 7 dni, samo se računa iz datuma registracije"


note = db(db.accounting.ac_organization == 
user).select(db.accounting.ac_note).first()["ac_note"]
"""Če je danes večji od konca free user acounta in v polju ac_note ni nič, 
kar pomeni da se mu mail še ni poslal, se runstatus spremeni v 1
in pošlje se mail, ter new user date se skreira ki je 7 dni kasnej da lahko 
še en teden gleda ne more pa računat"""

if ((today.date() > userFreeEndDate) and (not note or note is None)):
"runStatus gre v 1 in in ac_end_Date se poveča za 7 dni, uporabnik ne 
more več dat računat"
newUserRegEndDate = userFreeEndDate + datetime.timedelta(days=7)
db(db.accounting.ac_organization == user).update(ac_run_status = 1, 
ac_end_date = newUserRegEndDate)
runStatus = 1
#TO-DO
#Pošlji mail obema, in to se zapiše v ac_note da se ne pošilja vsakič 
ko kdo klikne F5
message_content = T('Your Free user account expired. If you are 
satisfied with Woshi and would like to use it more, please contact xxx to 
extend \
your subscription. Thank you')
mail.send(to=[email],
subject='Woshi Free user account expired',
message=message_content,
)

   
mail.send(to = 'xx',
  subject= 'User account expired',
  message = 'User with e-mail address ' + email + ' has expired 
his subscription. Better call him !'
 )
db(db.accounting.ac_organization == user).update(ac_note = 'Free user 
expiration mail sent.')

"Če je danes po tem ko ma user konc accounta - tega se ročno nastavla"
elif ((today.date() > userFreeEndDate) and (runStatus == 1)):

"User ne more računat zato gre ac_run_status v 0 in user ne more ni 
več, tud ne vid več svojih skript itd."
db(db.accounting.ac_organization == user).update(ac_run_status = 0)
runStatus = 0
#TO-DO
#Pošlji mail obema
message_content = T('Your user account expired. Please contact  to 
extend your subscription and continue using Woshi.')
mail.send(to=[email],
subject='Woshi User account expired',
message=message_content,
)


mail.send(to = '',
  subject= 'User account expired',
  message = 'User with e-mail address ' + email + ' has expired 
his subscription. Better call him !')
db(db.accounting.ac_organization == user).update(ac_note = 'User can

[web2py] Error in imageutils.py

2016-03-25 Thread Luis Díaz
Web2py 2.14.2,  imageutils.py in line 31, falta una coma ","

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Postgres Notify ..!?

2016-03-25 Thread António Ramos
http://bjorngylling.com/2011-04-13/postgres-listen-notify-with-node-js.html

hi , could postgres NOTIFY be better/simpler than having to install tornado
to have socket message to my app?


Regards
António

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Error in imageutils.py

2016-03-25 Thread Leonel Câmara
Yep you're right. I made a pull request fixing it.

https://github.com/web2py/web2py/pull/1249

This commit is to blame:
https://github.com/web2py/web2py/commit/8058dc2ce6b12e71fd109b48ec9b8b2b2f09e6f0

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread Leonel Câmara
Nevermind I clearly needed more coffee.

This is weird. Why would calling it in web2py be different. I can't 
replicate this. Is it possible web2py was launched before you changed the 
timezone?.

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Online manual like the web2py book

2016-03-25 Thread Leonel Câmara
Here you go:

https://github.com/mdipierro/web2py-book

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread mfarees . knysys
Yes, that's exactly what happened. I did not restart web2py after changing 
the timezone and I don't want to do that too. I want the correct time 
dynamically, without having to restart the server.

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Online manual like the web2py book

2016-03-25 Thread Nico Zanferrari
Also, you can look at the book application by yourself; the local
installation is quite simple and it works fine on PythonAnywhere, see
http://web2py.com/books/default/chapter/29/03/overview?search=web2py-book

Just use the .git URL (https://github.com/mdipierro/web2py-book.git ) in
the upload form ;-)




2016-03-25 14:08 GMT+01:00 Leonel Câmara :

> Here you go:
>
> https://github.com/mdipierro/web2py-book
>
> --
> 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 Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread mfarees . knysys
Here is some more info on this. The datetime module does not return the 
correct time if the timezone is changed, unless the Python instance is 
restarted.
 http://bugs.python.org/issue17627

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why datetime.now() is not returning correct value

2016-03-25 Thread Leonel Câmara
Humm if you don't mind installing python for windows extensions. You could 
try:

import platform
import datetime
if platform.system() == 'Windows':
from win32timezone import TimeZoneInfo, TimeZoneDefinition
localnow = 
datetime.datetime.now(TimeZoneInfo(TimeZoneDefinition.current()[1]))
else:
localnow = datetime.datetime.now()
print localnow


-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: What are the platforms for free web hosting of web2py apps?

2016-03-25 Thread Philip Kilner

Hi Michael,

On 24/03/16 21:23, Michael Beller wrote:

For low volume apps, GAE is also great - I run several apps (really just
simple sites) on GAE for free (but I don't think that supports PHP either).


Happily, GAE does now support PHP: -

https://cloud.google.com/appengine/docs/php/

:-)

HTH

--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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 Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: compute field and uploading file

2016-03-25 Thread aetagothno
Instead of removing the upload/compute field and making a separate table 
for that.. Is this something a virtual field can be used for?

I'm still trying to read more on virtual fields and gain an understanding 
but essentially the compute field will call onto a class which is being 
passed the rows, and initializing an array so that each instance of the 
form fields are appended for that session ..I would have to make some kind 
of check for when the array is filled for the session and then I'd be able 
to do my file insert portion... Then and only then will there be an upload. 
This makes me feel like there definitely needs to be a separate table for 
the uploads so then I question the virtual field idea


If any of this makes sense of what I'm trying to accomplish, any advice 
would 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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Postgres Notify ..!?

2016-03-25 Thread Anthony
On Friday, March 25, 2016 at 8:41:49 AM UTC-4, Ramos wrote:
>
>
> http://bjorngylling.com/2011-04-13/postgres-listen-notify-with-node-js.html
>
> hi , could postgres NOTIFY be better/simpler than having to install 
> tornado to have socket message to my app?
>

No, PostgreSQL NOTIFY will send notifications to a process *on the server*. 
You still need a way to then push that notification to the browser. In the 
post linked above, node.js is playing the role that Tornado plays in 
web2py's websocket_messaging feature.

Anthony

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] new Starter app (alternative to Welcome app)

2016-03-25 Thread Alessio Varalta
Is great! I think is a good choose to introduce a functionality that in 
admin console you can choose this as starter

On Friday, 25 March 2016 11:09:38 UTC+1, Ramos wrote:
>
> This starter is sooo cool.
> Its was time we had something like this.
>
>
>
> 2016-03-24 19:51 GMT+00:00 Ron Chatterjee  >:
>
>> Its all good. Just asked. 
>>
>>
>> On Thursday, March 24, 2016 at 3:33:00 PM UTC-4, Michael Beller wrote:
>>>
>>> No Avatar field yet!  It's hardcoded in the template.  It should be easy 
>>> to add a custom field to the auth_user table following these instructions:
>>>
>>> http://web2py.com/books/default/chapter/29/09/access-control?search=auth_user#Customizing-Auth
>>>
>>> Then you can upload an avatar using the user profile page.
>>>
>>> I haven't done this with images but it should be straight forward (it's 
>>> on my todo list!)
>>>
>>> You can also designate a dedicated folder for the avatar uploads so 
>>> they're not commingled with other upload files ...
>>>
>>> http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=upload#SQLFORM-and-uploads
>>>
>>> On Thursday, March 24, 2016 at 3:03:41 PM UTC-4, Ron Chatterjee wrote:

 I am sorry, I was having some problem downloading the latest version so 
 everything is good. Quick question Michael, how does someone change the 
 profile picture? There is a avatar field?

 On Thursday, March 24, 2016 at 11:56:27 AM UTC-4, Michael Beller wrote:
>
> The appconfig in 2.13 has a problem with strings separated by comma's 
> in the appconfig.ini file.  Starter app uses 2.14.1
>
> You can either install 2.14.1 or just change ...
>
> line 34 in initialize.py:
> for group in myconf.get('admin_user.auth_groups'):
>
> could replace with
> for group in ['Admin', 'Customer Service', 'Operations']:
>
> or just change the function to create the Admin group which is all 
> that's needed.
>
>
>
> On Thu, Mar 24, 2016 at 11:20 AM, Ron Chatterjee  > wrote:
>
>> Not sure its ready to be posted. I just downloaded the app and I 
>> don't see any initialization. My experience...it seems have some issues 
>> still (see the attached pic) . When I tried to register, I get this 
>> error:
>>
>>
>> Traceback *(*most recent call last
>> *):   *File "…\web2py\gluon\restricted.py"*, *line 227*, in *
>> restricted
>> *exec *ccode *in *environment
>>   File" …applications/starter/controllers/default.py" 
>> *,
>>  
>> *line 91*, in <*module
>> *>   *File "…web2py\gluon\globals.py"*, *line 412
>> *, in  self.*_caller *= lambda *f*: *f
>> *()   *File …/starter/controllers/default.py" 
>> *,
>>  
>> *line 70*, in *user
>> *return *dict*(*form*=*auth
>> *())   *File "…web2py\gluon\tools.py"*, *line 1923*, in *__call__
>> *return *getattr*(self, *args*[*0
>> *])()   *File "…\tools.py"*, *line 3375*, in *register
>> *self.*login_user*(*user
>> *)   *File "…web2py\gluon\tools.py"*, *line 2630*, in *login_user
>> user *= *Row*(*user
>> *)   *File "…\helpers\classes.py"*, *line 18*, in *__init__
>> *return self.*__dict__*.*__init__*(**args*, ***kwargs
>> *) *TypeError*: *'NoneType' object *is not *iterable
>>
>> Using 2.13.4 (which has a flash bar rash that just don't go away). 
>>
>>
>>
>> On Thursday, March 24, 2016 at 10:38:35 AM UTC-4, Michael Beller 
>> wrote:
>>>
>>> I commonly create a user (usually my email) and an Admin group and 
>>> then add myself to the Admin group.  I have logic in the Starter app 
>>> based 
>>> on the Admin group.  I usually have other groups such as Operations and 
>>> Customer Service (I tend to build enterprise 'line of business' apps).  
>>> Since I frequently clean out the database during initial development, I 
>>> just created an initialization function that automatically adds an 
>>> initial 
>>> set of test users, groups, and memberships so I don't have to do it 
>>> manually,   The Initialization function also calls a function that 
>>> automatically populates tables with test data (using the Populate 
>>> function) 
>>> that is helpful for quick demos during prototyping and user demos.  You 
>>> can 
>>> modify the routines to meet your needs - it's just something I always 
>>> end 
>>> up creating so I put it in my scaffold app.
>>>
>>> On Thu, Mar 24, 2016 at 9:13 AM,  wrote:
>>>
 This may be little preliminary but what you mean by "Admin user and 
 auth_groups" setup and how? I don't recall anything to set up with the 
 welcome app. It worked the first time straight out of the box.

>

[web2py] alternate date/time widgets?

2016-03-25 Thread ..mg..
I'm looking to replace the date and time widgets that ship with web2py.  
My dream widget would use dropdowns (or similar) for 
month/day/hour/minute, but store values as datetime objects (like native 
web2py).

Does anyone have experience or recommendations with this?  

Thanks,

-mg

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: compute field and uploading file

2016-03-25 Thread aetagothno
Given the table :
db.define_table('form1',
Field('field1, 'string'),
Field('field2', 'string'),
Field('field3', 'integer'),
Field('form1_file', 'upload', compute=fpost))

If a user is starting a form session and enter the value 2, they submit 
values for:
field1_0, field2_0, field3_0
field1_1, field2_1, field3_1

and the function fpost within models looks like:

def fpost(row):
print row.values()

This will print the entered values like this:
['value1', 'value2', 'value3']
['value4', 'value5', 'value6']


These are seperate..so I need to create a dynamic array which is filled 
based on the session so that the row values results in: ['value1', 
'value2', 'value3', 'value4', 'value5', 'value6']

Therefore I try making a class, but I'll either get an attribute error or 
something of the sort and cannot access anything using keyword row within 
it.. Here is what the models looks like with this implementation:


*db1.py*

class fpost(object):

form_list=[]
def __init__(self):
fpost.form_list.append(self)


def disp_arr():
for i in fpost.form_list:
print i
   
disp_arr()

db.define_table('form1',
Field('field1, 'string'),
Field('field2', 'string'),
Field('field3', 'integer'),
Field('form1_file', 'upload', compute=fpost()))

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py 2.14.1 is OUT

2016-03-25 Thread Dave S
On Thursday, March 24, 2016 at 4:55:27 PM UTC-7, Dave S wrote:
>
> On Thursday, March 24, 2016 at 1:17:18 PM UTC-7, Dave S wrote:
>>
>> On Thursday, March 24, 2016 at 12:41:50 PM UTC-7, Dave S wrote:
>>>
>>> On Thursday, March 24, 2016 at 10:36:54 AM UTC-7, Massimo Di Pierro 
>>> wrote:

 http://web2py.com/

 First of all many many thanks to Simone (niphlod), Richard, and Leonel. 
 Most of the work is theirs.


>>> My thanks also ... web2py has been a great resource for me.
>>>
>>> As with the beta, I'm still getting a problem with one app:
>>>
>>> web2py
>>> Version 2.14.1-stable+timestamp.2016.03.24.17.26.52Python  Python 2.7.3: 
>>> /usr/bin/python (prefix: /usr)
>>>
>>>
>>>
>>> Traceback (most recent call last):
>>>   File "/home/develop2/web2py/web2py-2141-beta/gluon/restricted.py", 
>>> line 227, in restricted
>>> exec ccode in environment
>>>   File "/home/develop2/web2py/web2py-2141-beta/applications/uploader/
>>> models/scheduler.py", line 5, in 
>>> from upwatcher import uploadwatch
>>>   File "/home/develop2/web2py/web2py-2141-beta/gluon/custom_import.py", 
>>> line 95, in custom_importer
>>> return base_importer(pname, globals, locals, fromlist, level)
>>> ImportError: No module named uploader.modules.upwatcher
>>>
>>>
>>>
>>> Note   [applications/]uploader/models/scheduler.py is trying to import 
>>> [applications/]uploader/module/upwatcher.py
>>>
>>> This worked in 2.13.4,broke in 2.14.1-beta, still broke in 2.14.1
>>> I've verified that upwatcher.py is present and contains the expected 
>>> code.
>>> [...]
>>>
>>  

> I see that the upwatcher.py doesn't have an upwatcher.pyc, nor does the 
> __init__.py have an __init__.pyc.
>

After browsing through gluon for a while, I tried

uploadwatch = local_import("uploadwatch")


 but I get the same error 

('No module named 
uploader.modules.upwatcher')

/dps


-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py 2.14.1 is OUT

2016-03-25 Thread Anthony
Do you have an __init__.py in /applications as well as /uploader?

Anthony

On Friday, March 25, 2016 at 3:13:35 PM UTC-4, Dave S wrote:
>
> On Thursday, March 24, 2016 at 4:55:27 PM UTC-7, Dave S wrote:
>>
>> On Thursday, March 24, 2016 at 1:17:18 PM UTC-7, Dave S wrote:
>>>
>>> On Thursday, March 24, 2016 at 12:41:50 PM UTC-7, Dave S wrote:

 On Thursday, March 24, 2016 at 10:36:54 AM UTC-7, Massimo Di Pierro 
 wrote:
>
> http://web2py.com/
>
> First of all many many thanks to Simone (niphlod), Richard, and 
> Leonel. Most of the work is theirs.
>
>
 My thanks also ... web2py has been a great resource for me.

 As with the beta, I'm still getting a problem with one app:

 web2py
 Version 2.14.1-stable+timestamp.2016.03.24.17.26.52Python  Python 2.7.3
 : /usr/bin/python (prefix: /usr)



 Traceback (most recent call last):
   File "/home/develop2/web2py/web2py-2141-beta/gluon/restricted.py", 
 line 227, in restricted
 exec ccode in environment
   File "/home/develop2/web2py/web2py-2141-beta/applications/uploader/
 models/scheduler.py", line 5, in 
 from upwatcher import uploadwatch
   File "/home/develop2/web2py/web2py-2141-beta/gluon/custom_import.py", 
 line 95, in custom_importer
 return base_importer(pname, globals, locals, fromlist, level)
 ImportError: No module named uploader.modules.upwatcher



 Note   [applications/]uploader/models/scheduler.py is trying to import 
 [applications/]uploader/module/upwatcher.py

 This worked in 2.13.4,broke in 2.14.1-beta, still broke in 2.14.1
 I've verified that upwatcher.py is present and contains the expected 
 code.
 [...]

>>>  
>
>> I see that the upwatcher.py doesn't have an upwatcher.pyc, nor does the 
>> __init__.py have an __init__.pyc.
>>
>
> After browsing through gluon for a while, I tried
>
> uploadwatch = local_import("uploadwatch")
>
>
>  but I get the same error 
>
> ('No module named 
> uploader.modules.upwatcher')
>
> /dps
>
>
>

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py 2.14.1 is OUT

2016-03-25 Thread Dave S


On Friday, March 25, 2016 at 12:22:22 PM UTC-7, Anthony wrote:
>
> Do you have an __init__.py in /applications as well as /uploader?
>
> Anthony
>

Ha!  I just figured it out, and saw your message as I came back to report.

It was uploader/__init__.py that was missing.  I had missed that when 
telling BeyondCompare what to copy from the 2.13.4 landscape.  I seem to 
have missed it in another app, but there were no modules to import so I got 
away with it; I did copy one app correctly.

/dps


> On Friday, March 25, 2016 at 3:13:35 PM UTC-4, Dave S wrote:
>>
>> On Thursday, March 24, 2016 at 4:55:27 PM UTC-7, Dave S wrote:
>>>
>>> On Thursday, March 24, 2016 at 1:17:18 PM UTC-7, Dave S wrote:

 On Thursday, March 24, 2016 at 12:41:50 PM UTC-7, Dave S wrote:
>
> On Thursday, March 24, 2016 at 10:36:54 AM UTC-7, Massimo Di Pierro 
> wrote:
>>
>> http://web2py.com/
>>
>> First of all many many thanks to Simone (niphlod), Richard, and 
>> Leonel. Most of the work is theirs.
>>
>>
> My thanks also ... web2py has been a great resource for me.
>
> As with the beta, I'm still getting a problem with one app:
>
> web2py
> Version 2.14.1-stable+timestamp.2016.03.24.17.26.52Python  Python 2.7.
> 3: /usr/bin/python (prefix: /usr)
>
>
>
> Traceback (most recent call last):
>   File "/home/develop2/web2py/web2py-2141-beta/gluon/restricted.py", 
> line 227, in restricted
> exec ccode in environment
>   File "/home/develop2/web2py/web2py-2141-beta/applications/uploader/
> models/scheduler.py", line 5, in 
> from upwatcher import uploadwatch
>   File "/home/develop2/web2py/web2py-2141-beta/gluon/custom_import.py", 
> line 95, in custom_importer
> return base_importer(pname, globals, locals, fromlist, level)
> ImportError: No module named uploader.modules.upwatcher
>
>
>
> Note   [applications/]uploader/models/scheduler.py is trying to import 
> [applications/]uploader/module/upwatcher.py
>
> This worked in 2.13.4,broke in 2.14.1-beta, still broke in 2.14.1
> I've verified that upwatcher.py is present and contains the expected 
> code.
> [...]
>
  
>>
>>> I see that the upwatcher.py doesn't have an upwatcher.pyc, nor does the 
>>> __init__.py have an __init__.pyc.
>>>
>>
>> After browsing through gluon for a while, I tried
>>
>> uploadwatch = local_import("uploadwatch")
>>
>>
>>  but I get the same error 
>>
>> ('No module named 
>> uploader.modules.upwatcher')
>>
>> /dps
>>
>>
>>

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: compute field and uploading file

2016-03-25 Thread Leonel Câmara
Can you tell me exactly what you're trying to do? I so how you're trying to 
do it and it seems complicated, so I'd like to know what you're trying to 
accomplish first.

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: alternate date/time widgets?

2016-03-25 Thread Massimo Di Pierro
I made these

http://mdipierro.github.io/stupid.css/widgets/index.html

Still beta but the calendar one is there to stay. I will be come default in 
web2py in the next version.

On Friday, 25 March 2016 12:17:18 UTC-5, ..mg.. wrote:
>
> I'm looking to replace the date and time widgets that ship with web2py.   
> My dream widget would use dropdowns (or similar) for 
> month/day/hour/minute, but store values as datetime objects (like native 
> web2py). 
>
> Does anyone have experience or recommendations with this?   
>
> Thanks, 
>
> -mg 
>

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] How to modify a scheduled task?

2016-03-25 Thread Arun Kumar
Hi,
   I'm using scheduler to run different jobs everyday. To create a new job 
I simply insert into scheduler_task table like below,

db.scheduler_task.insert(function_name = "run_job", task_name = "job1", 
repeats = 1, period = 86400, start_time = start_time, stop_time = end_time, 
prevent_drift = True)

The scheduled jobs are running as expected. Say if I want to modify my job1 
which I inserted above how can I do? If I open the appadmin db and modify 
the start_time to a current time + few secs/mins the next schedule not 
triggered. How can I achieve this? 

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to modify a scheduled task?

2016-03-25 Thread Dave S


On Friday, March 25, 2016 at 4:46:22 PM UTC-7, Arun Kumar wrote:
>
> Hi,
>I'm using scheduler to run different jobs everyday. To create a new job 
> I simply insert into scheduler_task table like below,
>
> db.scheduler_task.insert(function_name = "run_job", task_name = "job1", 
> repeats = 1, period = 86400, start_time = start_time, stop_time = end_time, 
> prevent_drift = True)
>
> The scheduled jobs are running as expected. Say if I want to modify my 
> job1 which I inserted above how can I do? If I open the appadmin db and 
> modify the start_time to a current time + few secs/mins the next schedule 
> not triggered. How can I achieve this? 
>


Works for me, but I have a repeating task and I'm changing next_run_time. 
 Is your status field "QUEUED"?

/dps
 

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: compute field and uploading file

2016-03-25 Thread Dave S
On Friday, March 25, 2016 at 12:49:54 PM UTC-7, Leonel Câmara wrote:
>
> Can you tell me exactly what you're trying to do? I see how you're trying 
> to do it and it seems complicated, so I'd like to know what you're trying 
> to accomplish first.
>

It looks like he's doing 2 things:   adding multiple rows to the table 
during one submit, and creating a file that logs what those changes are.

(Does this file get mailed to someone to be reviewed?)

If he has kept the id[s] of the rows submitted, he might be able to make 
his report just by retrieving that/those row[s].  This might suggest an 
onupdate callback.

/dps

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] auth_user table

2016-03-25 Thread Jerry Liu
Hello, all

I found something really weird happened to my auth_user table.

whenever I try to add a new user to auth_user table, it gives me a default 
value 38 for the *Created By* field.

So I keep getting  IntegrityError: *FOREIGN KEY constraint failed *because 
there is not such a user with id = 38. I think I probably had this user 
before, and deleted it. 

I have also tried adding it on the database management page 
from administrative interface, but it gave me the same error, and I can see 
that a default value 38 is set in the input box on the page.

weird!

any 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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py 2.14.2

2016-03-25 Thread pbreit
I got an error on this change:

https://github.com/web2py/web2py/commit/bd6115ad62bd8b8610f5bb23c92305c368e57d37#diff-03411a71189d2ba825e3b902d58cc824R62

Traceback (most recent call last):
  File "/Users/pbreit/dev/messagedesk/web2py/gluon/restricted.py", line 227, in 
restricted
exec ccode in environment
  File 
"/Users/pbreit/dev/messagedesk/web2py/applications/messagedesk/models/db.py" 
, line 33, in 

auth = Auth(db, host=myconf.get('host.name'))
TypeError: __init__() got an unexpected keyword argument 'host'



Easy to fix but FYI.

-- 
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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.