[web2py] Re: Embed pdf and file download

2015-11-23 Thread Gael Princivalle
Someone have an idea? Il giorno venerdì 20 novembre 2015 16:52:10 UTC+1, Gael Princivalle ha scritto: > > My doubt was also about the file name, that could give problems perhaps, > with all these dots. > But I've uploaded the file > memos.memo_file.a1c04cabc73895b5.487964726f7665722d48313630312

[web2py] Using web2py with werkzeug?

2015-11-23 Thread lillian
Hello, I have an existing web2py app that I want to run behind mezzanine (the django CMS). Meaning, mezzanine would provide the landing page/blog/etc. and after logging in the content would be provided by the web2py app. On another forum it was recommended that I use werkzeug's DispatcherMidd

[web2py] Re: How to add an hour to datetime field

2015-11-23 Thread mfarees . knysys
I've already tried this, but it didn't work. I get this error. type object 'datetime.datetime' has no attribute 'timedelta' On Friday, November 20, 2015 at 1:00:07 PM UTC+5, Annet wrote: > > It should be: > > datetime.timedelta(hours=1) > > So: > > db(db.myTable.id == 1).update(start = db.myTable

[web2py] Re: auth new user registration even after login

2015-11-23 Thread 黄祥
i guess you have set : step 1 : auth.settings.actions_disabled = ['register'] step 2 set the callback : def __after_insert_auth_user(f, id): row = db(db.auth_user.id == id).select().first() mail.send(mail.email, 'Login credential', 'Email : %s, Password : password' % (mail.email) ) db.auth_user.

[web2py] Re: auth new user registration even after login

2015-11-23 Thread Dave S
On Monday, November 23, 2015 at 5:38:45 PM UTC-8, Kalpish Singhal wrote: > > I want my admin user group can only register new members and their > password should be send to respective user mail id using auth_user table, > how to do this when auth is logged in because no signup option is their

[web2py] auth new user registration even after login

2015-11-23 Thread Kalpish Singhal
I want my admin user group can only register new members and their password should be send to respective user mail id using auth_user table, how to do this when auth is logged in because no signup option is their after login in the menu? -- Resources: - http://web2py.com - http://web2py.com/bo

[web2py] Re: How to add an hour to datetime field

2015-11-23 Thread Anthony
On Sunday, November 22, 2015 at 4:29:00 AM UTC-5, Annet wrote: > > I had this from the web2py book: > > db(db.person.id > 3).update(name='Ken') > > > and adapted it to update records in an event list: > > db(db.cal_event_list.id > 0).update(createdOn = > db.cal_event_list.createdOn + datetime.time

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-11-23 Thread Niphlod
not to point fingers around, but can you try installing psycopg2 ? it'll override pg8000 that showed here and there some obscure bugs: pscopg2 is certainly more solid. If the same happens with psycopg2, can we see the actual function queued (or a function that replicates this behaviour) ? BTW:

[web2py] Re: How to add an hour to datetime field

2015-11-23 Thread Niphlod
ok, let's elaborate. db(db.person.id > 3).update(name='Ken') and db(db.person.id > 3).update(name=db.person.name+'Ken') are actually REALLY different (from the database perspective). The first passes a FIXED value to the database, which discards any value contained in the "name" column and repla

Re: [web2py] Re: web2py and python3

2015-11-23 Thread Remco Boerma
I've done my homework and agree Massimo. There is hardly a thing that requires python3 that doesn't work with python2. The only one i know is https://micropython.org/ but it's not a big company, nor a "big" product. Op woensdag 11 november 2015 16:21:18 UTC+1 schreef Massimo Di Pierro: > > As

[web2py] Re: Scheduler, run code first of each month

2015-11-23 Thread Niphlod
On Monday, November 23, 2015 at 2:44:33 AM UTC+1, Jason Solack wrote: > > So i realized i could have the scheduler run once a day and have my code > verify it's the day i need the actual code to run. > Yep, it's probably the best idea given the current feature-set. I manage it with a "master t

[web2py] Re: Nginx Gateway Timeout

2015-11-23 Thread Niphlod
If the problem is on nginx side, you can raise the timeout value using uwsgi_read_timeout. That should be tuned accordingly to the "harakiri" parameter of uwsgi, which is by default 60 seconds. That being said, letting a request to occupy a "web resource" for MORE than 60 seconds, IMHO SCREAMS

Re: [web2py] RBAC and group of role management

2015-11-23 Thread Niphlod
This has been reported before but it just triggers for the next level up in the hierarchy (Group C that manages access to Group B that manages access to Group A). RBAC as is is a complete and finite tool to manage permission: it enforces (as many other things in web2py) sane defaults, levelling

[web2py] Re: how do debug my error if not using web browser?

2015-11-23 Thread Niphlod
if the error gets somehow logged by web2py, web2py.exe -D 0 is the way to go. But it doesn't suffice if you don't configure logging properly (see logging.conf ). If the error is instead trapped by web2py's execution environment (wh

[web2py] Re: Scheduler timing out even though the task completes

2015-11-23 Thread Niphlod
If you're really returning at the end (not near, the actual end) how many records were added, the very "returned" data would cause your task to be COMPLETED. If you're printing near the end, and then returning something, then the task TIMEOUTing is probably stuck trying to flush stdout/stderr b

[web2py] Re: Scheduler erroring when threading and trying to do database update.

2015-11-23 Thread Niphlod
without the complete code is hard to see where the exception may raise, but a serious question arises: why should you manage threads inside a scheduler-executed task ? At that level of abstraction, if you NEED to fine-tune code execution at that level, just use a normal web2py shell. Did you t

[web2py] Scheduler erroring when threading and trying to do database update.

2015-11-23 Thread Benson Myrtil
I am getting the following error when running a scheduler task with threading: Traceback (most recent call last): File "C:\Users\devteam\Desktop\web_apps\launchpad\production\web2py\gluon\scheduler.py", line 298, in executor functions = current._scheduler.tasks AttributeError: 'thread._

[web2py] Scheduler timing out even though the task completes

2015-11-23 Thread Benson Myrtil
Hey guys I have the scheduler running a task. The task hits an API, downloads data and imports into our database using MySQL LOAD DATA INFILE. There are several API endpoints we hit so I use the same base code to make the request, and pass in a variable that tells the system which endpoint to h

[web2py] Re: Oracle drivers.

2015-11-23 Thread Michael M
I did. And still no luck.It Jams me because run web2py from CLI and Rocket serves it. It Oracle works flawlessly with Web2py. So it maybe just an Apache/Mod_WSGI thing. I am trying to get NginX and ( UWSGI or Gunicorn ) to work on my environment ( Fedora 22 / RHEL 7 ) On Monday, Nov

[web2py] how do debug my error if not using web browser?

2015-11-23 Thread noam cohen
I have a controller with a syntax error or some other error. When accessing it using Chrome (for example), I see the stack trace and can easily fix it. However, my real http client is a mobile app that send http GET commands to the server. It just sees the "500 internal error" and from this time

[web2py] Re: Oracle drivers.

2015-11-23 Thread Cássio Botaro
Do you already tried sudo dnf install python-pip sudo pip install cx_Oracle ? -- 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

[web2py] RBAC and group of role management

2015-11-23 Thread Richard
Hello, I would like to know how (if possible) I can manage group access for permission granted by other role. For example, I have group A, that allow user member from it to access func A... But how can I create or represent that all members of group B can grant the access to group A and group C

[web2py] Re: Nginx Gateway Timeout

2015-11-23 Thread Jim S
How long does it take to process the pdf create requests? I believe there is a timeout value set in your nginx config. You might want to increase that. Or, what I've done in the past is to kick this off to the scheduler to run it and then send an email with the pdfs attached when it is comple

Re: [web2py] Re: web2py 2.0 DAL no longer usable for mysql stored procedures

2015-11-23 Thread Dániel Finta
Solution found: db._adapter.cursor.callproc(..) res = db._adapter.cursor.nextset() while res != None: print result res = db._adapter.cursor.nextset() In a nutshell you have data waiting to be fetched and DAL skrews it up.. 2015. november 21., szombat 18:32:14 UTC+1 időpontban Dániel Finta

[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-23 Thread Anthony
What does the code look like? Are you calling db.commit() at any point? On Sunday, November 22, 2015 at 9:58:05 PM UTC-5, Mark Graves wrote: > > Are there any caveats to know about running applications in shell mode > (e.g. transactions / returning id)? > > I'm running a middleware migration scri

Re: [web2py] Re: A MCV-related question: global search form

2015-11-23 Thread Johann Spies
Thanks Leonel and Ian. Just in case it might help someone else, this is the code in layout.html that works for me: {{if response.menu:}} {{=MENU(response.menu, _class='nav navbar-nav',li_class='dropdown',ul_class='dropdown-menu')}} {{pass}} {{='au

Re: [web2py] web2py / pydal returning id 1 in postgres

2015-11-23 Thread Johann Spies
Which database backend do you use and what does the table definition look like in that backend? Regards Johann On 23 November 2015 at 04:58, Mark Graves wrote: > Are there any caveats to know about running applications in shell mode > (e.g. transactions / returning id)? > > I'm running a middle