[web2py] web2py on free hosting with no shell or httpd.conf access

2011-01-28 Thread Leon
Hi, I got interested in web2py after seeing the no install/ configuration comment on the web2py homepage. Is it possible to copy the web2py folder to a free hosting account and somehow get up and running? The account I currently have has python (but only able to execute python files with .cgi exten

[web2py] How should I present the content?

2011-05-08 Thread leon
programer but I have not worked with web programming so much. Is html5 with CSS3 enough or should I use even java-script? (Do not want use php!). I am very, very grateful for any suggestions. best regards Leon

[web2py] CMS functionality

2013-05-13 Thread leon
search over the existing metadata contained in xhtml. I am a seasoned pro in python but have not worked with web frameworks. Grateful for advice. regards Leon -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this

Re: [web2py] Re: How should I present the content?

2011-05-08 Thread Leon Chop
Hello, Thanks for advice pbreit! I would like to use rrdtools but do not know if it's possible only with HTML5/CSS5. But true as you said, "KIS" and see how far I get thanks! regards Leon On 8 maj 2011 18:41 "pbreit" wrote: > Keep it simple. Start with HTML and

[web2py] default_application does not work on 2.14.6 version

2016-05-15 Thread Bernardo Leon
Good morning, I just clone the github repository and then create a routes.py file in the web2py folder. This file only have one line: default_application = 'myapplication' but it does not, when I try to load my site it defaults to the welcome application, the only way it works is changing its n

[web2py] Re: default_application does not work on 2.14.6 version

2016-05-16 Thread Bernardo Leon
in the model file: response.title = 'yourappname' And that's it, I hope it could help to someone else. El domingo, 15 de mayo de 2016, 10:48:35 (UTC-5), Bernardo Leon escribió: > > Good morning, I just clone the github repository and then create a > routes.py file in

[web2py] 'Query' object has no attribute 'tablename' when using show_if

2016-06-20 Thread Bernardo Leon
Hi, a am using show_if to show a field only if the user is a member of a certain group, I am using this query: *db.table.field.show_if = **(db.auth_membership.user_id == auth.user_id) & (db.auth_membership.group_id == 2)* but it gives me this error: 'Query' object has no attribute 'tablename'

[web2py] Re: 'Query' object has no attribute 'tablename' when using show_if

2016-06-21 Thread Bernardo Leon
x27;s Auth role, so you probably > want something like: > > db.table.field.readable = db.table.field.writable = auth.has_membership(2) > > Anthony > > On Monday, June 20, 2016 at 5:53:27 PM UTC-4, Bernardo Leon wrote: >> >> Hi, a am using show_if to show a field onl

[web2py] auth.settings.auth_two_factor_enabled = True gives me setting key 'auth_two_factor_enabled' does not

2016-07-15 Thread Bernardo Leon
Hello, I am trying to use two factor authentication for my entire app so I have my model like this: db = DAL('sqlite://database.db', migrate_enabled=False, lazy_tables=True) auth = Auth(db) auth.define_tables(username=True, signature=True) auth.settings.actions_disabled.append('register') auth.se

[web2py] Re: dumbest question ever: how do you jump to line in the w2p ide

2016-07-15 Thread Bernardo Leon
Mmm I have no idea but can I suggest you to use pycharm? After all it integrates with web2py and being a full teatured IDE you can jump to lines, set breakpoints, code completion and more, check this: https://www.jetbrains.com/help/pycharm/2016.1/web2py.html El viernes, 3 de junio de 2016, 16:5

[web2py] Re: dumbest question ever: how do you jump to line in the w2p ide

2016-07-15 Thread Bernardo Leon
El viernes, 3 de junio de 2016, 16:51:01 (UTC-5), Mark Billion escribió: > > I cant find this anywhere, but Ive seen it somewhere. Say Im editing in > the admin application and want to jump to line 1000. Whats the key binding > for it? > > Feel free to heckle as long as you also provide the a

[web2py] Re: auth.settings.auth_two_factor_enabled = True gives me setting key 'auth_two_factor_enabled' does not

2016-07-17 Thread Bernardo Leon
Thank you for yor reply my web2py version is: Version 2.12.3-stable+timestamp.2015.08.19.00.18.03 I am defining one extra field auth.settings.extra_fields['auth_user'] = [Field('motp_secret', 'password', length=512, default='', label='MOTP Secret')] What I am trying to do is implementing googl

[web2py] Re: auth.settings.auth_two_factor_enabled = True gives me setting key 'auth_two_factor_enabled' does not

2016-07-17 Thread Bernardo Leon
elp me with the extra_field issue? What am I doing wrong? And thank you for your help ;) El domingo, 17 de julio de 2016, 12:22:21 (UTC-5), Anthony escribió: > > On Sunday, July 17, 2016 at 12:53:40 PM UTC-4, Bernardo Leon wrote: >> >> Thank you for your reply >> >>

[web2py] Re: auth.settings.auth_two_factor_enabled = True gives me setting key 'auth_two_factor_enabled' does not

2016-07-18 Thread Bernardo Leon
Thanks for your reply, I was making a mistake. I have been calling auth.define_tables(...) before auth.settings.extra_fields['auth_user'] = [Field()] I have switched between them and now I have my field in the database so thank you :) Now I have Google authentication working, thank you guys

[web2py] Is it possible reload my model.py from an ajax request?

2016-08-05 Thread Bernardo Leon
Hi, I have an SQLFORM.grid form and when I am inserting data I want to make the selectors work in cascade. I have seen some recipies where they create by hand the form using plain html and throw some jQuery in the middle but I dont like it, I like the cleaness of web2py so I am looking for a cle

[web2py] Re: Is it possible reload my model.py from an ajax request?

2016-08-05 Thread Bernardo Leon
call from the parent dropdown without refreshing the child? > > On Friday, August 5, 2016 at 11:28:44 AM UTC-5, Bernardo Leon wrote: >> >> Hi, I have an SQLFORM.grid form and when I am inserting data I want to >> make the selectors work in cascade. I have seen some recipies

[web2py] Re: Is it possible reload my model.py from an ajax request?

2016-08-05 Thread Bernardo Leon
; http://demos.telerik.com/kendo-ui/dropdownlist/cascadingdropdownlist > > might help > > On Friday, August 5, 2016 at 1:28:01 PM UTC-4, Bernardo Leon wrote: >> >> No, I am trying to get the cascade dropdowns working. >> >> I want to make an AJAX call from the parent dropdown AN

[web2py] Re: Is it possible reload my model.py from an ajax request?

2016-08-05 Thread Bernardo Leon
ion javascript ejecutada') function onChangeRedTrafico(){ eval("ajax('{{=URL('default', 'onChangeRedTrafico')}}', ['red_trafico'], '')"); } Red Trafico Canal {{=formulario}} I am using web2py version: Version

[web2py] Re: Is it possible reload my model.py from an ajax request?

2016-08-12 Thread Bernardo Leon
need the HTML on the page to change as the result of > an Ajax request, then the Ajax request must actually return the new HTML > (or return the relevant data needed for the JS code to construct the HTML). > > Anthony > > On Friday, August 5, 2016 at 4:19:22 PM UTC-4, Bernard

[web2py] Scheduler task runs before it is supposed to run

2016-09-19 Thread Bernardo Leon
Hi, I am trying to run tasks in the future based on a time the user specifies but as soon as the task is queued it is executed, what am I doing wrong? I am using web2py Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 This is my model.db (part of it) db = DAL('sqlite://recomendadorexpertos.

[web2py] Re: Scheduler task runs before it is supposed to run

2016-09-20 Thread Bernardo Leon
hanks. El lunes, 19 de septiembre de 2016, 13:37:05 (UTC-5), Niphlod escribió: > > sorry, a bug slipped in. In the wait for the fix, please use next_run_time > in addition to start_time. > > On Monday, September 19, 2016 at 6:27:28 PM UTC+2, Bernardo Leon wrote: >> >> Hi,

[web2py] Re: Scheduler task runs before it is supposed to run

2016-09-21 Thread Bernardo Leon
o many workers, or a too low heatbeat) > > this is the fix https://github.com/web2py/web2py/pull/1453 . you can > subscribe to it to know when it'll be merged. > > On Tuesday, September 20, 2016 at 5:38:08 PM UTC+2, Bernardo Leon wrote: >> >> Thank you for your re

[web2py] Why cant fetch rows using select when importing models using the -M option?

2016-10-03 Thread Bernardo Leon
I load my application in this way: $ python web2py.py -M -S myexistingapp if I run: db(db.my_table.logged_user == auth.user_id).select() I get: even if I run: db(db.my_table.logged_user == 1).select() or db(db.my_table.logged_user == 1L).select() I get: but if I run: db.executesql('se

[web2py] Re: Why cant fetch rows using select when importing models using the -M option?

2016-10-03 Thread Bernardo Leon
What happens if you do (note the ._select rather than .select): > > db.executesql(db(db.my_table.logged_user == 1)._select()) > > Anthony > > On Monday, October 3, 2016 at 12:40:09 PM UTC-4, Bernardo Leon wrote: >> >> I load my application in this way: >> $ python

[web2py] Re: Why cant fetch rows using select when importing models using the -M option?

2016-10-04 Thread Bernardo Leon
ll? thanks! El lunes, 3 de octubre de 2016, 12:20:21 (UTC-5), Bernardo Leon escribió: > > Thanks for noting it, now I am passing the user id as part of pvars of the > task but with not much progress, though > > If I run that query I get an empty list: [] > > El lunes, 3 de o

[web2py] Re: Why cant fetch rows using select when importing models using the -M option?

2016-10-04 Thread Bernardo Leon
ames to simplify my questions ;) El martes, 4 de octubre de 2016, 11:19:50 (UTC-5), Anthony escribió: > > On Tuesday, October 4, 2016 at 10:36:57 AM UTC-4, Bernardo Leon wrote: >> >> Now if I only run >> >> db(db.my_table.logged_user == 1)._select() >>

[web2py] Is it possible to run doctests for scheduler tasks?

2016-10-31 Thread Bernardo Leon
Hi, I have seen in the book that running web2py with the -T flag I can run doctests for my controllers but I want to run doctests for my scheduler tasks. Is it possible? How? Thank you! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Problem while integrating Sweet Alert with web2py in a component

2017-01-03 Thread Bernardo Leon
Hi, I have a component which has a button that performs an action when clicked but I want the user accept some terms before executing that action. I found Sweet Alert (http://t4t5.github.io/sweetalert/) so I am trying to use their confirm dialog between the click and the action. Since Sweet Aler

[web2py] Re: Problem while integrating Sweet Alert with web2py in a component

2017-01-03 Thread Bernardo Leon
st to that exact URL, and does your pedir() function then > receive the proper value of pid? > > Anthony > > On Tuesday, January 3, 2017 at 11:06:33 AM UTC-5, Bernardo Leon wrote: >> >> Hi, I have a component which has a button that performs an action when >> clicked

[web2py] How can I set the column width of a SQLFORM.grid table?

2016-05-02 Thread Bernardo Leon
Hello, I have this table in my model: db.define_table('data', Field('description', 'string'), Field('value', 'integer')) this controller in default.py: def index(): tableN = SQLFORM.grid(db.data, maxtextlengths={'data.description':500})

[web2py] best way to put together components that interact between them

2017-02-24 Thread Bernardo Leon
Hi, I am trying to create a page that uses 3 components. I want each component to be reusable. The first component is a search box, based on the search box result I want to load the second component (a grid) with the first result as a parameter. When I click on a link in the second component gr

[web2py] Re: best way to put together components that interact between them

2017-02-26 Thread Bernardo Leon
ion ? > > Em sexta-feira, 24 de fevereiro de 2017 18:25:42 UTC-3, Bernardo Leon > escreveu: >> >> Hi, I am trying to create a page that uses 3 components. I want each >> component to be reusable. >> >> The first component is a search box, based on the search bo

[web2py] Re: best way to put together components that interact between them

2017-02-26 Thread Bernardo Leon
web2py.com/books/default/chapter/29/12/components-and-plugins?search=load#Reload-another-component > > Reload other component .. but before of the reload the component , use the > javascript to show it and so perform the feature.. > I think > > The documentation too use the .reloa

[web2py] Re: best way to put together components that interact between them

2017-02-28 Thread Bernardo Leon
t; > Em sexta-feira, 24 de fevereiro de 2017 18:25:42 UTC-3, Bernardo Leon > escreveu: >> >> Hi, I am trying to create a page that uses 3 components. I want each >> component to be reusable. >> >> The first component is a search box, based on the search box

[web2py] Re: app slow on pythonanywhere

2017-07-17 Thread Bernardo Leon
I am sorry for resurrecting this post but I am facing the same problem. Using the web2py -F profile option and then reading that dump with runsnakerun I see that fcntl.flock is where more time is spent. I have disabled migrations in the appconfig.ini and in the DAL constructor but I am still ha

[web2py] Can't log into the application if using redis for sessions

2017-07-18 Thread Bernardo Leon
Hi, I want to use redis to handle my app sessions. I am using the next code in my model: from gluon.tools import Auth from gluon.contrib.redis_utils import RConn from gluon.contrib.redis_session import RedisSession gth_dev_db_connection_string = 'postgres://dev_db:dev_db@[ip]/dev_db' db = DAL(gt

[web2py] Re: app slow on pythonanywhere

2017-07-18 Thread Bernardo Leon
Thank you for your answer, Indeed I am using several ajax requests and I am not able to use session.forget(response) on my components since I need the session information. I have installed redis to test but now I am facing another problem that I have detailed here: https://groups.google.com/for

[web2py] Re: Can't log into the application if using redis for sessions

2017-07-19 Thread Bernardo Leon
Thank you for your answer, I installed redis as localhost and changed that line to use RConn() without parameters unfortunately I am still getting the same problem. If I run: redis-cli KEYS "*" I get 3 keys created 1) "w2p:sess:app:serial" 2) "w2p:sess:app:1" 3) "w2p:sess:app:id_idx" So I ca

[web2py] Re: Can't log into the application if using redis for sessions

2017-07-19 Thread Bernardo Leon
Thank you so much! I've been as dumb as fry ;) Now I can log in without issues. El miércoles, 19 de julio de 2017, 9:41:03 (UTC-5), Leonel Câmara escribió: > > Nevermind I found your problem. You are connecting the Session after > instantiating Auth. You need to do it before as Auth checks stuff

[web2py] Re: app slow on pythonanywhere

2017-07-19 Thread Bernardo Leon
I am using now redis for session handling on the same machine of the webserver and got rid of big fcntl.flock lock. Thank you so much for your help! El martes, 18 de julio de 2017, 23:04:33 (UTC-5), Bernardo Leon escribió: > > Thank you for your answer, Indeed I am using several ajax re

[web2py] Re: Page with four LOAD components is too slow

2017-07-20 Thread Bernardo Leon
so I don't think it is an application issue. Is it ok? Thank you El miércoles, 19 de julio de 2017, 11:51:22 (UTC-5), Bernardo Leon escribió: > > Hi, I am facing a problem with performance. I have a view with four LOAD > calls that is taking almost 15 seconds to load. I kn

[web2py] Is a good practice add .table files to source control?

2017-07-20 Thread Bernardo Leon
If two developers use git to develop an application and obviously they have their model file on git do they need to have the same .table files? I have a postgresql development database on a digitalocean server and my partner is unable to connect to the database that I created originally even if

[web2py] Re: Page with four LOAD components is too slow

2017-07-20 Thread Bernardo Leon
Yes, the application, redis and the database are in the same server. This server has 512 MB of RAM but I don't think I am using all the ram. I have 48mb free right now. Regarding the code, it just makes simple selects on one or two tables (the querys arent doing anything weird). Do you still th

[web2py] response.js does not execute in the oncreate callback

2017-07-20 Thread Bernardo Leon
Hello, I have a component which has an SQLFORM.grid and an oncreate and ondelete callbacks on which I execute a response.js. When I delete a record the response.js javascript function is executed but when I create a record the response.js javascript function does not get executed (but the python

[web2py] Re: Page with four LOAD components is too slow

2017-07-21 Thread Bernardo Leon
It seems that you are right, I set up a virtual machine with 4gb ram only for the database and I ran the code along with redis on my laptop with 16gb ram and my times now are nearly the 600ms. I think it is good enough. Having some components that don't perform selects rendering only a simple h

[web2py] Re: Is a good practice add .table files to source control?

2017-07-21 Thread Bernardo Leon
You are right, maybe a development server and a production server could have different .table files but share the same model file. There is no problem for us to keep one of our versions with fake_migrate=True. Can we switch who is using migrate=True? What happens if both of us use migrate=True

[web2py] Re: response.js does not execute in the oncreate callback

2017-07-22 Thread Bernardo Leon
Hi Massimo, done. The issue is #1693 Try to take a look at it please, thank you! El sábado, 22 de julio de 2017, 15:35:57 (UTC-5), Massimo Di Pierro escribió: > > Please open a ticket about this it gets tracked. > > On Thursday, 20 July 2017 20:43:40 UTC-5, Bernardo Leon wrote: &g

[web2py] How to customize widgets to act like Onsen UI components

2017-09-15 Thread Bernardo Leon
I have been researching about UI Frameworks and stumbled upon Onsen UI . It seems easy and provides good results but to use this UI Framework I need to use their components which are html tags. If I have a field that is rendered as an html input how can I customize its widget

[web2py] Re: How to customize widgets to act like Onsen UI components

2017-09-16 Thread Bernardo Leon
> > Based on the above, you could create custom widgets -- see the various > widget classes in gluon.sqlhtml. Once you've got some custom widgets, you > could then monkey patch SQLFORM.widgets by overwriting some or all of its > items with your custom classes -- then you

[web2py] Re: How to customize widgets to act like Onsen UI components

2017-09-16 Thread Bernardo Leon
You are right, thank you! El sábado, 16 de septiembre de 2017, 17:58:36 (UTC-5), Anthony escribió: > > On Saturday, September 16, 2017 at 4:23:43 PM UTC-4, Bernardo Leon wrote: >> >> Awesome as always Anthony Thank you! >> >> Yes I am talking about the SQLFORM Field

[web2py] Cant access Google Cloud SQL on GAE application

2017-10-12 Thread Bernardo Leon
Hello, me again. I am testing Google Cloud Platform along with pycharm (I added a new run configuration for gae inside pycharm) and I have the following model: # -*- coding: utf-8 -*- from gluon.tools import Auth db = DAL('google:sql://trahello:trahello-db/trahello') I have installed the googl

[web2py] Returning row id upon download click

2017-12-24 Thread Ray Leon
. aa)DescriptionUpload ByUpload Date Filename Download File NoneNoneLeon Grant 2017-12-13 17:32:25test_doc_2.txt As you can see, the table also stores the original filename. What I need is to be able to return the row ID or