Re: [web2py] web2py.com seams down

2015-12-09 Thread Massimiliano
It’s up for me. On Wed, Dec 9, 2015 at 10:54 AM, Manuele Pesenti wrote: > Just tried to access web2py web site but it seams unreachable... anybody > else got the same result? > > M. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book

[web2py] web2py.com seams down

2015-12-09 Thread Manuele Pesenti
Just tried to access web2py web site but it seams unreachable... anybody else got the same result? M. -- 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: Contribution to validators

2015-12-09 Thread Pierre-Antoine Roiron
I seems like I forgot to add IS_TITLE() to the __all__ declaration or whatever is its name in validators.py (I am not an developer, sorry for the inapropriate vocabulary). It seems to work for now. I am still open to some explanations (what is validators.pyc). -- Resources: -

[web2py] use case: user login on android

2015-12-09 Thread noam cohen
Hi I need help implementing this scenario: user opens the android app. app checks if he is currently logged in. if not, open the login web page ( in a webview - as seen in the

[web2py] Re: use case: user login on android

2015-12-09 Thread Anthony
> > >1. how can I check if user is currently logged in? I saw the session >cookie but not sure how to infer from it the status. Also, a user could >have logged in long time ago, have the cookie but the session will expire. >I guess something like this is needed in

[web2py] Re: Static files inside of folder with spaces (url encoding)

2015-12-09 Thread Anthony
Are you serving web2py via the built-in server? If not, you can configure your web server (e.g., nginx or Apache) to server static files directly. Anthony On Wednesday, December 9, 2015 at 2:35:16 AM UTC-5, Jaime Sempere wrote: > > Hi, > > I am trying to put some files inside of folder with a

[web2py] Re: Retrieve record field labels in sqlform.grid custom view

2015-12-09 Thread Gael Princivalle
>Is there a reason you can't just do db.memos.code.label? Sorry Anthony, I can just do db.memos.code.label, thanks. Il giorno domenica 29 novembre 2015 20:49:55 UTC+1, Anthony ha scritto: > > Can you provide more details regarding what you are trying to do? Is there > a reason you can't just do

[web2py] Re: web2py resources

2015-12-09 Thread Matheus Cardoso
I just asked if there was one place to gather resources about web2py and when Richard shared some similiar thoughts, I did a search on github and a quick search on Google and couldn't nothing related (web2slices I already know, but I'll get there), even www.web2pyref.com. So I created a

Re: [web2py] web2py.com seams down

2015-12-09 Thread Manuele Pesenti
Il 09/12/15 10:56, Massimiliano ha scritto: > It’s up for me. yes it's back even for me now. Thanks Manuele -- 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] Re: Embed pdf and file download

2015-12-09 Thread Gael Princivalle
Thanks a lot Leonel. I have integrated the pdf.js like Mark have done (thanks Mark). I've got some troubles also with pdf.js. With block center in the layout file pdf was not displayed. {{block center}} {{include}} {{end}} Without, pdf is displayed. We talk about a custom grid view. I've to

Re: [web2py] launch web2py from python interpreter

2015-12-09 Thread Richard Vézina
I guess I will fallback with that solution... It is more fonctional testing... I actually remix Vinicius web2py.test example... Thanks Richard On Tue, Dec 8, 2015 at 3:39 PM, Anthony wrote: > You probably don't want to run tests by making HTTP calls to web2py > running

[web2py] Re: Using apsw with web2py

2015-12-09 Thread Jitun John
Thanks a lot Massimo Di Pierro, Its working great. I wanted to make an .exe of the application, so I added to web2py/applications/yourapp/modules/ I kind of figured out how to use DAL with similar functionality. So I will play with both settings. On Tuesday, December 8, 2015 at 10:43:43 AM

[web2py] Re: Static files inside of folder with spaces (url encoding)

2015-12-09 Thread Jaime Sempere
Yes, that's my problem the web2py server looks like he is not able to handle spaces on static paths to access those files... any other advice? El miércoles, 9 de diciembre de 2015, 14:31:36 (UTC+1), Anthony escribió: > > Are you serving web2py via the built-in server? If not, you can configure

[web2py] Porblem with customized login

2015-12-09 Thread Annet
I have the following default/user function: auth.settings.login_onaccept = lambda form: __on_login() auth.settings.logout_onlogout = lambda user: __on_logout() def user(): form = auth() if request.args(0) == 'login': if request.vars.setting == 'on_failed_authentication':

[web2py] web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread dirman
i just install web2py on ubuntu 12.04 on vps.net server but can't route to web2py this is what i am getting from Apache instead of the web2py welcome app It works! This is the default web page for this server. The web server software is running but no content has been added, yet. i need

[web2py] Re: web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread Anthony
Did you follow the deployment instructions for Apache: http://web2py.com/books/default/chapter/29/13/deployment-recipes#Apache-setup On Wednesday, December 9, 2015 at 11:09:09 AM UTC-5, dirman wrote: > > i just install web2py on ubuntu 12.04 on vps.net server but can't route > to web2py > >

Re: [web2py] Re: problem while adding a radio button in login form

2015-12-09 Thread Richard Vézina
What about setting 2 ldap authentication ? In web2py you can login with multiple login methods and web2py use them in the order they are specified in auth.settings.login_methods... If password fail for one it tries with the other... Here my settings : auth.settings.login_methods = \ [auth,

[web2py] Re: Porblem with customized login

2015-12-09 Thread Anthony
I'm not sure I follow exactly what is going on, but note that with form = auth(), all the login logic is handled inside of auth(), including any redirects -- so the code may never get past that line. Also, as an aside, if you define your callback functions to accept a single argument (even

[web2py] Re: web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread Pierre-Antoine Roiron
This script is for ubuntu 14.04, not 12.04. Nothing stroke me but I could be missing something. Did you try sudo service apache2 restart -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Embed pdf and file download

2015-12-09 Thread Gael Princivalle
I think the best solution is to use the actual version of pdf.js, that offer more functions to the user (zoom...) and perhaps will avoid some incompatibilities. For example pdf files saved by the Windows 10 scan software are not read by the pdf.js version that have used Mark. -- Resources: -

[web2py] Re: web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread Pierre-Antoine Roiron
Did it returned any error or warning while executing? -- 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

[web2py] Re: web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread Pierre-Antoine Roiron
Did it returned any error or warning while executing? -- 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

[web2py] Re: Bug / Dumb Question a = b= []

2015-12-09 Thread Ron McOuat
Are you sure you want to do that? a = b = [] binds a and b to the same empty list object so whatever you do to a will also appear in b because they both reference the same list object. Assignment does not create a new object, it simply binds a variable name on the left to the object on the

[web2py] Re: web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread Pierre-Antoine Roiron
Cam you check that default.conf is in /etc/apache2/site-enable/, and that it contains references to web2py? -- 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)

Re: [web2py] Re: Bug / Dumb Question a = b= []

2015-12-09 Thread Richard Vézina
Python idiom should be : a, b = [], [] I remember having learn that in an presentation about idiomatic python, in this presentation I think : https://www.youtube.com/watch?v=OSGv2VnC0go=WL=14 :) Richard On Wed, Dec 9, 2015 at 3:25 PM, Ron McOuat wrote: > Are you sure

[web2py] Pyodel announcement

2015-12-09 Thread Richard D
Hi, Some years ago a discussion took place about a LMS. Since then Alan Etkin has created Pyodel. I contacted Alan and decided to take this project forward. A Github repo https://github.com/RichDijk/pyodel is created for code management. This is the initial version which is exact like the

Re: [web2py] Re: Bug / Dumb Question a = b= []

2015-12-09 Thread Richard Vézina
Around 33 minutes... On Wed, Dec 9, 2015 at 3:45 PM, Richard Vézina wrote: > Python idiom should be : a, b = [], [] > > I remember having learn that in an presentation about idiomatic python, in > this presentation I think : >

Re: [web2py] Re: Error db._adapter

2015-12-09 Thread Hector Chacon
good afternoon, I explain how to solve the problem in question, so that the method ".executesql" the DAL object fails with the message "'NoneType' object is not iterable" the problem is that when you run a stored procedure, the method attempts to obtain the return of the execution of the

[web2py] aws s3 uploadfs

2015-12-09 Thread Mark Graves
Hey everyone, I've got an odd issue I've been experiencing. I uploaded about 10k files through the DAL into my local filesystem. Then, I s3synced them, and mounted the s3 to the uploadfs for the DAL field. The bucket and permissions for the keys and configuration works, because I accessed

[web2py] db.define_table Advanced Field

2015-12-09 Thread Alessandro Leonetti
Good evening, I'm running into a problem quite uncomfortable but I'm pretty sure there is a fairly simple way to resolve it. I defined the various tables within my database and put them in relation with each other (one to many, many to many etc.). The problem is that when I insert a new record

[web2py] Re: aws s3 uploadfs

2015-12-09 Thread Mark Graves
Interesting update. I used the same code from the command line, it worked. Copied and pasted inside web2py, it stopped working with 403. On Wednesday, December 9, 2015 at 5:26:52 PM UTC-6, Mark Graves wrote: > > Hey everyone, > > I've got an odd issue I've been experiencing. > > I uploaded

[web2py] Re: How does auth.signature work? deletion of inactive records

2015-12-09 Thread Massimo Di Pierro
It is well hidden http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=auth.signature#Table-inheritance On Wednesday, 9 December 2015 00:17:17 UTC-6, at wrote: > > Hi, > > I am unable to find explanation of how does auth.signature works anywhere > including

[web2py] Re: How does auth.signature work? deletion of inactive records

2015-12-09 Thread 黄祥
i think you can use on delete database callback to execute sql syntax to delete the inactive record. 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

[web2py] Re: Retrieve record field labels in sqlform.grid custom view

2015-12-09 Thread Massimo Di Pierro
yes db.memos.code.label = 'Codice' grid = SQLFORM.grid(db.memos) Notice that: if grid.view_form is not None than it is the readonly form. It therefore contains grid.view_form.record.code but this is the field value not the field object and therefore it is a 'string' and it does not have a

[web2py] Re: aws s3 uploadfs

2015-12-09 Thread Massimo Di Pierro
Let's look at this in my office tomorrow. ;-) On Wednesday, 9 December 2015 18:58:12 UTC-6, Mark Graves wrote: > > Interesting update. > > I used the same code from the command line, it worked. > > Copied and pasted inside web2py, it stopped working with 403. > > On Wednesday, December 9, 2015

[web2py] Re: How does auth.signature work? deletion of inactive records

2015-12-09 Thread at
Thank you Massimo. One quick question: When we use auth.signature, and then delete records in a table, they are marked as deleted but they are not actually deleted from the database. What is the recommended way to delete such records from the database? Best Regards, AT On Thursday, 10

[web2py] Re: Pyodel announcement

2015-12-09 Thread Massimo Di Pierro
This was built by some of my students. It is incomplete but has lots of goodies. On Wednesday, 9 December 2015 14:53:33 UTC-6, Richard D wrote: > > Hi, > > Some years ago a discussion took place about a LMS. Since then Alan Etkin > has created Pyodel. > I contacted Alan and decided to take this

[web2py] Re: web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread Massimo Di Pierro
Just be clear. Apache is a very old product and we do not recommend it with web2py. We recommend nginx. On Wednesday, 9 December 2015 14:31:07 UTC-6, Pierre-Antoine Roiron wrote: > > Cam you check that default.conf is in /etc/apache2/site-enable/, and that > it contains references to web2py?

[web2py] SQLFORM.grid custom buttons text

2015-12-09 Thread Анатолий Стешенко
Good day. How i can change text of buttons of the SQLFORM.grid? For example i want to change "Add Record" to "Add new item","View" to "Show details". -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Using apsw with web2py

2015-12-09 Thread Massimo Di Pierro
The easiest way is this: download the windows version of web2py. Unzip it. Put all the modules you need in web2py/site-packages. Install your app (bytecode compiled) and call it "init". Then zip the web2py folder again. That is your distributable binary app. On Wednesday, 9 December 2015

[web2py] Re: SQLFORM.grid custom buttons text

2015-12-09 Thread Massimo Di Pierro
One way is to use internationalization. Make an en.py language file and translate the strings anyway one want, using the admin languages tab. No coding required. On Wednesday, 9 December 2015 22:57:39 UTC-6, Анатолий Стешенко wrote: > > Good day. How i can change text of buttons of the

[web2py] Re: Static files inside of folder with spaces (url encoding)

2015-12-09 Thread Anthony
If you don't need to use the pattern-based rewrite system, you can use the parameter-based rewrite system to customize the legal characters allowed in static file names. Just create a routes.py file in the root /web2py folder and include the following: routers = dict( BASE=dict(

[web2py] Re: web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread dirman
i used the script: wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh and chod +x setup-web2py-ubuntu.sh ./setup-web2py-ubuntu On Wednesday, December 9, 2015 at 4:35:19 PM UTC, Anthony wrote: > > Did you follow the deployment instructions for Apache: >