[web2py] nginx cannot import any module

2016-03-06 Thread lungupconstantin
Hi everyone, Just deployed my web2py app on a NGINX + uswgi server. Unfortunately, when I try to run it, I keep getting the error "no such module", although I have these modules installed and can use them locally. I understand that this may be a Path/Permissions problem but I am a newbie to P

[web2py] Edit layout of SQLFORM.smartgrid not display the value of filed whose type is "list:string"

2016-03-06 Thread Yibing Liu
Hello everyone, I am using SQLFORM.smartgrid to edit the records in my database. But when I press the "edit" button to edit a record in my database the fileds value whose type is "list:string" not display. But other type fields show the values fine. The following code is the field definition: F

[web2py] Problem reading html file with TAG, ValueError: invalid literal for int() with base 10: '32D'

2016-03-06 Thread Robin Manoli
Hello, I have this code to read html files. The code was working on a different system with an old installation of web2py (not sure if gluon.html could have changed). import gluon.html def myfunc(path, filename): with open(path+filename, 'r') as content_file: html = content_file.rea

[web2py] Re: for those of us who do not understand ...

2016-03-06 Thread Ron Chatterjee
Massimo, these are really good design work. You really set the bar for everyone else! On Sunday, March 6, 2016 at 2:48:10 AM UTC-5, eric cuver wrote: > > it's very good thanks massimo > > Le samedi 5 mars 2016 23:36:28 UTC+1, Massimo Di Pierro a écrit : >> >> You can also compare this: >> >>

[web2py] PostgreSQL: json_agg()

2016-03-06 Thread Val K
Hi! This is useful aggregate function for PG-users (tested with PostgreSQL 9.3 ): def json_agg_sql(flds_lst, as_alias): json_fld_sql = """ '"%s":' || to_json(%s) """ json_row = [json_fld_sql % (f.name, f.name) for f in flds_lst] json_row_sql = "'{' || " + "|| ',' ||".joi

[web2py] Re: Django guys get a job easily. Why don't web2py guys get a job? How to get a job?

2016-03-06 Thread Ron Chatterjee
I would like to add my two cents because I struggled with the same questions in the beginning: there isn't really much difference between django and web2py except for ORM and the template (web2py template language is the most easiest to learn as its very pythonic, in my opinion). Once you have

[web2py] Fields from multiple tables in a single form

2016-03-06 Thread David Orme
I have a table like this: db.define_table('visit', Field('project_id', 'integer', 'references projects'), Field('arrival_date','date'), Field('departure_date','date'), Field('number_of_visitors','integer'), Field('purpose','text'), Field('proposer_id', 'integer', 'reference

Re: [web2py] custom form no submiting

2016-03-06 Thread prashant joshi
thank u On Fri, Mar 4, 2016 at 1:55 AM, Fabiano Almeida wrote: > *view:* > > {{extend 'layout.html'}} > {{=form.custom.begin}} > > > > {{=db.stud_person.first_name > .label}} > {{=form.custom.widget.first_name}} > >

Re: [web2py] custom form no submiting

2016-03-06 Thread prashant joshi
Than u Fabiano Almeida its run On Sun, Mar 6, 2016 at 10:39 PM, prashant joshi wrote: > thank u > > > On Fri, Mar 4, 2016 at 1:55 AM, Fabiano Almeida > wrote: > >> *view:* >> >> {{extend 'layout.html'}} >> {{=form.custom.begin}} >> >> >> >> {{=db.stud_per

Re: [web2py] Re: how to create my own profile??

2016-03-06 Thread prashant joshi
it not show any record...it wiil be show only form On Fri, Mar 4, 2016 at 4:17 PM, Sukrut Joshi wrote: > > > On Friday, March 4, 2016 at 1:42:34 AM UTC+5:30, prashant joshi wrote: >> >> how to make my profile like a facebook?? >> if i am login then i will show my record as like image ,name,em

Re: [web2py] Re: Create a service running continuously

2016-03-06 Thread Paul Gerrard
Hi thanks for the suggestions. Sorry for not responding sooner. I figured a way of working and been working abroad for a few days...) so I haven't tried your suggestions. What worked for me was I wrote a service that returned the contents of a table that define the bot commands and called it using

[web2py] rows in layout.html and squeezing forms

2016-03-06 Thread Pierre
Hi, am learning the view construction process and I did some experiments: first I noticed there's no with class='row' in layout.html which uses bootstrap col-*-* classes. why ? then I tried to squeeze the browser window and to change the default classes to see what happens : welcome/index.html

[web2py] Re: How to use Let's Encrypt with Web2Py on Apache

2016-03-06 Thread Jacinto Parga
It's ok. I have already solved it with routes.py and the error handler. Thanks anyway El sábado, 5 de marzo de 2016, 0:30:35 (UTC+1), Jacinto Parga escribió: > > How can routes.py be configured to return the requested file? > > The page requested is something like this: > > > http://example.com/

[web2py] Re: letsencrypt google appengine with web2py

2016-03-06 Thread Jacinto Parga
With GAE deployed apps... The best solution I've found is using an error handler and a redirection to the static file with the letsencrypt response. Something like this: In routes.py: routes_onerror = [ ('myapp/*', '/myapp/default/error_handler') ] In the error_handler controller: def err

[web2py] Re: Problem reading html file with TAG, ValueError: invalid literal for int() with base 10: '32D'

2016-03-06 Thread Anthony
Looks like a bug that was fixed about three years ago. What version of web2py are you using? Anthony On Sunday, March 6, 2016 at 6:22:49 AM UTC-5, Robin Manoli wrote: > > Hello, I have this code to read html files. The code was working on a > different system with an old installation of web2py

[web2py] Re: how to correctly use the scheduler (if at all)

2016-03-06 Thread noam cohen
> > Here is the summary of what I came up with, if anyone has similar > situation. > modules/long_task.py: def nwm_send_email(mailer,*args,**kwargs): """Send an email using the supplied dict args. This function is called by the scheduler""" args = args[1] # the first element is

[web2py] Re: for those of us who do not understand ...

2016-03-06 Thread Massimo Di Pierro
Hello Ron, I changed the page so that when you hover on an example it shows a "?" and if you just click it shoes you the source of the example. I use jQuery for this and only for this. Does it makes it easier to learn? Massimo On Saturday, 5 March 2016 12:14:48 UTC-6, Ron Chatterjee wrote: >

[web2py] Re: Auth User split by tables

2016-03-06 Thread Ron Chatterjee
I have the auth_user split up between employer and employee After the profile is created I want to be able to modify the employee profile. So, I have this in my model auth.settings.profile_onaccept = lambda form: after_profile(form) In my controller: def after_profile(form): if form.v

[web2py] random generator of stupid pages

2016-03-06 Thread Massimo Di Pierro
http://mdipierro.github.io/stupid.css/themes/random.html -- 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 subscri

[web2py] Re: random generator of stupid pages

2016-03-06 Thread Dave S
On Sunday, March 6, 2016 at 8:49:15 PM UTC-8, Massimo Di Pierro wrote: > > http://mdipierro.github.io/stupid.css/themes/random.html > Nice! Thank you! /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://co