[web2py] Re: What a good web2py application architecture looks like?

2016-11-21 Thread mfarees . knysys
I'll definitely keep these tips in mind. Thank you ppl. -- 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 subscrib

Re: [web2py] Re: web2py react-python

2016-11-21 Thread Mark Graves
One other thing that popped into my head after reading Anthony's points about search engine indexing would be permanent URI views (theoretically), whereas with pure JS apps often my experience has been less than thrilling with the routing capacities. On Mon, Nov 21, 2016 at 3:41 PM, Anthony wrote

[web2py] Re: web2py react-python

2016-11-21 Thread Anthony
On Monday, November 21, 2016 at 4:44:07 AM UTC-5, Leonel Câmara wrote: > > José a use case may be for graceful degradation when clients don't have > javascript. > The other typical use cases for server-side rendering are (a) support search engine indexing, and (b) faster rendering of the initial

[web2py] Re: 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-21 Thread Anthony
On Monday, November 21, 2016 at 2:39:21 AM UTC-5, Mark Graves wrote: > > This is great news! Thank you for working on this, all of you. > > Any ability to check out the errors? > Not that I know of. Note, the errors occurred only on the 20-update requests when running on physical hardware (I know

Re: [web2py] Re: web2py react-python

2016-11-21 Thread José Luis Redrejo
Yes, thanks for the use case. I had not thought of that possibility. Nowadays it's weird to think of someone using a non-javascript ready browser. José L. 2016-11-21 12:59 GMT+01:00 Mark Graves : > Way better use case Leonel, thanks =) > > On Mon, Nov 21, 2016 at 3:44 AM, Leonel Câmara > wrote:

[web2py] Re: Need help with VideoTest!!

2016-11-21 Thread 黄祥
perhaps you can use python subprocess, but it's not thread safe *e.g.* *static/scripts/test.sh* #!/bin/sh nohup python web2py.py -S VideoTest -M -R applications/VideoTest/modules/video_to_flv.py *controllers/default.py* import subprocess def test(): command = "applications/VideoTest/static/script

[web2py] Re: does field object know it's tablename?

2016-11-21 Thread Limedrop
Yes, it does. You can access the tablename like this: >>>db.auth_user.email._tablename 'auth_user' On Monday, 21 November 2016 23:14:00 UTC+13, Jurgis Pralgauskis wrote: > > or should I pass tablename to function alongside? > -- Resources: - http://web2py.com - http://web2py.com/book (Documen

Re: [web2py] db showing none

2016-11-21 Thread 黄祥
pls try python /web2py_path/web2py.py --nogui --no-banner -S appname -M 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 (Report Issues) --- You received

[web2py] Re: info: w3 css, responsive

2016-11-21 Thread Mirek Zvolský
Great. What about layout.html ? I just try to remove bootstrap dependencies... Or grid? On Monday, 21 November 2016 16:19:21 UTC+1, eric cuver wrote: > > I use w3 css it works well with web2py and cordova for mobile > > eg: for custum login > > {{=form.custom.begin}} > > Email > {{form.custom.

Re: [web2py] db showing none

2016-11-21 Thread Kiran Subbaraman
Are you starting the shell with the `-S application-name` option? Take a look at the command line options for web2py: http://web2py.com/books/default/chapter/29/04/the-core#Command-line-options Kiran Subbaraman http://subbaraman.wordpress.com/about/ On

Re: [web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread António Ramos
oops... :) rewinding my head again to the top of the thread. Thank you Leonel... 2016-11-21 17:07 GMT+00:00 Leonel Câmara : > Ramos you need to escape the % in 100% > > This should work > > b="\r\n\r\n \r\n > \r\n \r\n > *%(a)s*\r\n\r\n\r\n\r\n

[web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread Leonel Câmara
Ramos you need to escape the % in 100% This should work b="\r\n\r\n \r\n\r\n \r\n *%(a)s*\r\n \r\n\r\n\r\n\r\n\r\n\r\n" b % dict(a=1) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread António Ramos
simpler example i cannot interpolate this string b="\r\n\r\n \r\n\r\n \r\n *%(a)s*\r\n \r\n\r\n\r\n\r\n\r\n\r\n" like this b % dict(a=1) ValueError: unsupported format character *' ' '* (0x27) at index 103 2016-11-21 16:22 GMT+00:

[web2py] Re: Versioning Erro

2016-11-21 Thread Leonel Câmara
It is a bug, see: https://github.com/web2py/web2py/issues/1245 web2py needs to either remove the mercurial integration or keep up with their api modifications. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://co

[web2py] Re: Error when trying to submit or edit new data using sqlform.grid

2016-11-21 Thread Jim S
You need to initialize the form variable in the so when request.vars is null you have something pass to return. See - form = None in the code below. -Jim On Monday, November 21, 2016 at 9:42:54 AM UTC-6, Hugo wrote: > > > Hello, > > I am facing an error when using web2py sqlform.grid that I am

[web2py] Re: Create form for table

2016-11-21 Thread Jim S
To get started quickly I'd read through the book. Specifically: http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid -Jim On Monday, November 21, 2016 at 9:42:54 AM UTC-6, Eduardo A. Saad wrote: > > Hello All, > > I'm new to web2py. I'm on mac os x. > > I managed to:

[web2py] Re: web2py remote access

2016-11-21 Thread Jim S
What installation method did you use? How are you starting web2py? Is it running on port 80? -Jim On Monday, November 21, 2016 at 9:42:54 AM UTC-6, Mark C wrote: > > Hello. I've installed web2py on rhel 6 and have successfully connected to > the admin interface (ssh tunneling), but was inter

Re: [web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread António Ramos
my template "see attached file" in the console: response.render('templates/email_verification.html',dict(key="teststr")) works ok but response.render('templates/email_verification.html') % dict(key="teststr") does not work i get unsupported format character '!' (0x21) at index 615 this is the sam

Re: [web2py] Re: Check to establish whether or not a record exists

2016-11-21 Thread António Ramos
I used this compact way and i noticed it only returns one record. for example table db.badass id name value 1trump 10 2trump 20 3hilary30 db.badass(name="trump") only returns record with id =1 Regards António 2016-11-21 15:47 GMT+00:00 Massimo Di Pierro : > It depends

[web2py] Error code: 504-loadbalancer

2016-11-21 Thread Alberto Gedaly
I am trying to load my website which is hosted on PythonAnywhere but it is showing me the 504-loadbalancer error. This started happening after I installed the SQLEDITABLE plugin and started testing it (I tried to add some records to my table using the SQLEDITABLE). My error log says: 2016-

[web2py] Re: SQLFORM.FACTORY editing a document. Save reports no upload files

2016-11-21 Thread Kenwyn Pilgrim
I too have this issue with using SQLFORM.factory to edit. My model looks like: db.define_table('upload_file', Field('doc_type', 'reference document_type', required=True, label=T('Type')), Field('pdf_name', 'upload', label=T('PDF Document'),

[web2py] Re: Check to establish whether or not a record exists

2016-11-21 Thread Massimo Di Pierro
It depends a query is always field==value so you can do query = db.table.field == value row = db(query).select(limitby=(0,10)).first() or row = db.table(query) (they are equivalent) But db.table(...) can take an "implicit query" db.table(fieldname=value) which is a more compact

[web2py] Allow multiple login methods in web2py

2016-11-21 Thread Tommaso Bonato
Hello, I am building an application using web2py and I am not sure how I can enable multiple authentication methods at the same time. For example I would like to use both Google and Facebook OAuth and also allow the user to sign up using the default web2py authentication system. Right now I have

[web2py] why DAL decode_credentials=True can't work for task scheduler worker?

2016-11-21 Thread DengFeng Mao
I am using web2py Version 2.14.3-stable+timestamp.2016.03.26.23.02.02 with Mysql There is '@' in mysql password, Then I set decode_credentials=True in DAL. The web access and mysql access work well. Then I tried to add a task scheduler. The db table 'db.scheduler_task' , 'db.scheduler_run', 'db.

[web2py] db showing none

2016-11-21 Thread Divyanshu Srivastava
Hi ! I'm just getting started with web2py in db.py db = DAL(myconf.get('db.uri'), pool_size=myconf.get('db.pool_size'), migrate_enabled=myconf.get('db.migrate'), check_reserved=['all']) and in shell db is showing none i've tried DAL('sqlite://storage.s

[web2py] Create form for table

2016-11-21 Thread Eduardo A. Saad
Hello All, I'm new to web2py. I'm on mac os x. I managed to: 1. Install web2py. 2. Run it. 3. Create new application, similar to welcome. 4. Create table. (It started working when I added config related code). I want to create a form to view - add - update - delete data from my table. How do I d

Re: [web2py] Re: web2py_osx on Sierra (OSX 10.12)

2016-11-21 Thread Jared McFarland
I've also run into this. I'm on macOS 10.12.1 I downloaded the web2py app from http://www.web2py.com/examples/static/web2py_osx.zip When I try to run it, I get the same web2py error dialog: http://take.ms/IIXG5 Here are the details from the console: http://take.ms/tTTgG "Detected missing cons

[web2py] web2py remote access

2016-11-21 Thread Mark C
Hello. I've installed web2py on rhel 6 and have successfully connected to the admin interface (ssh tunneling), but was interested in calling controllers over port 80 from remote machines. Just testing around now, so ssl is not required. Many thanks for any thoughts. I'm on the 2nd web2py vid

[web2py] keyerror in update SQLFORM

2016-11-21 Thread Gaurav Vichare
Posting it again because my last post(7 days old) was not approved. I am facing issue while updating record using SQLFORM when readable and writable is False for id field and record_versioning is on. I am explaining this issue with example app 'mywiki' given in web2py book

[web2py] How to solve vertical alignment too high of SQLForm read-only field

2016-11-21 Thread Martin de Groot
In a SQLForm all widget-controls of writable fields are nicely, correctly vertically aligned with the preceding label. However, when one adds db.table.field.writable = False in the contrller-action function the widget-control is correctly changed from an input control to a read-only control, bu

Re: [web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2016-11-21 Thread Emiliano Torrano
Richard, I could fix it changing the following auth.message: auth.messages.ajax_failed_authentication For example: auth.messages.ajax_failed_authentication = DIV(H4(T('Your session has expired')), T('Please '), A(T('login'),

[web2py] Error when trying to submit or edit new data using sqlform.grid

2016-11-21 Thread Hugo
Hello, I am facing an error when using web2py sqlform.grid that I am not understanding why. I have the controller where I define the form: def search_records(): if request.vars: selectable = request.vars.z DBconn = db._uri name = searchtable(selectable) t

[web2py] Versioning Erro

2016-11-21 Thread Gilberto Diaz
I just start a Web2Py project in pythoneverywhere.com. I want to start with some version control so I clicked Versioning at the toolbar and gave it a name . After clicking commit I'm getting the following error... Ticket ID 184.61.59.121.2016-11-12.04-14-30.64632ebd-cdac-4f2b-bcca-571178

[web2py] headers of SQLFORM.grid doesn't work when using alias columns in a self-joined table

2016-11-21 Thread Hammer Lee
Hello, I'm using SQLFORM.grid to show a self-joined table for boss and employee. I want to show both employee's and boss's names, tittles & emails with different headers to distinguish bosses and employees. However, SQLFORM.grid doesn't replace original labels with headers on those duplicated

[web2py] Need help with VideoTest!!

2016-11-21 Thread Sharad Shrestha
I am trying to upload and play video using web2py. I am able to upload and play video. However, everytime I upload video I have to run this code in termial. To run VideoTest: # cd /path/to/web2py/ # nohup python web2py.py -S VideoTest -M -R applications/VideoTest/modules/video

[web2py] Re: what is in the cache ?

2016-11-21 Thread Pierre
I understand use-cases for time_expire=None but I don't see a use-case for time_expire=0 when you do cache.redis('message', lambda: 'Hello', time_expire=0) all the subsequent *cache.redis('message',)* will overwrite Hello to get a persistent Hello you have to write something like:

[web2py] Re: info: w3 css, responsive

2016-11-21 Thread eric cuver
I use w3 css it works well with web2py and cordova Le lundi 21 novembre 2016 13:17:41 UTC+1, Mirek Zvolský a écrit : > > not web2py, but looks interesting. > > http://www.w3schools.com/w3css/default.asp > > On mobile pages load instantly. In oposite to bootstrap3. > > Does somebody use it ? > > >

Re: [web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread António Ramos
but if i set tempvar=my previous response.render('templates/ema il_verification.html') then i do mail.send(to="myemail",subject="a",message=("",tempvar),sender="somesender..") i get the email! but if i register a new user i get the previous error... 2016-11-21 14:05 GMT+00:00 António Ramos : >

Re: [web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread António Ramos
my template is just html without any {{=var}} inside... 2016-11-21 14:04 GMT+00:00 António Ramos : > when i just use response.render without a dict , for ex... > > response.render('templates/email_verification.html') > > i get an error about invalid "!" in the template > [image: Imagem inline 1]

Re: [web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread António Ramos
when i just use response.render without a dict , for ex... response.render('templates/email_verification.html') i get an error about invalid "!" in the template [image: Imagem inline 1] 2016-11-21 13:21 GMT+00:00 Leonel Câmara : > username is passed by auth, and it's not necessarily the "usern

[web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread Leonel Câmara
username is passed by auth, and it's not necessarily the "username" field it can be the email if you're not using an username. Basically after register if you have registration_requires_verification auth send an email where the body is defined as d = dict(form.vars) # form.vars holds the regist

Re: [web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread 黄祥
perhaps you define username = False, not using username in auth_user e.g. auth.define_tables(username = False, signature = True) auth.messages.verify_email = response.render('templates/mail/test.html', dict(link = link) ) best regards, stifan -- Resources: - http://web2py.com - http://web2py.

Re: [web2py] Re: Custom html email on auth.settings.registration_requires_verification = True

2016-11-21 Thread António Ramos
Leonel, the code auth.messages.verify_email = response.render('templates/mail/test.html', dict(username = username, link = link) ) does not know what username is... *Username is not defined...* Thank you 2016-11-19 21:31 GMT+00:00 黄祥 : > perhaps you can use response.render in there > e.g

[web2py] info: w3 css, responsive

2016-11-21 Thread Mirek Zvolský
not web2py, but looks interesting. http://www.w3schools.com/w3css/default.asp On mobile pages load instantly. In oposite to bootstrap3. Does somebody use it ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

Re: [web2py] Re: web2py react-python

2016-11-21 Thread Mark Graves
Way better use case Leonel, thanks =) On Mon, Nov 21, 2016 at 3:44 AM, Leonel Câmara wrote: > José a use case may be for graceful degradation when clients don't have > javascript. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/we

[web2py] does field object know it's tablename?

2016-11-21 Thread Jurgis Pralgauskis
or should I pass tablename to function alongside? -- 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

[web2py] Re: strange behavior of $@ bash parameter expansion

2016-11-21 Thread Mirek Zvolský
I'm sorry. Primary reason (probably) was (of course) in my code. I have redirect inside model (maybe not good idea) and I missed the URL() function like so: redirect('library', 'choose_library') Some unexpected behaviour later was maybe from current state of trunk (where I see lot of new work!

[web2py] Re: web2py react-python

2016-11-21 Thread Leonel Câmara
José a use case may be for graceful degradation when clients don't have javascript. -- 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 mes