[web2py] Re: Side by Side a Form and a Grid

2016-01-04 Thread Niphlod
did you put column #1 column #2 in your page ? if so, it should be pretty clear :P https://jsfiddle.net/nps42vyp/ On Tuesday, January 5, 2016 at 6:58:19 AM UTC+1, Anthony Smith wrote: > > Hi, > > Thanks for the response I dont get what you mean, can you provide an > example. > > I have se

[web2py] Re: Side by Side a Form and a Grid

2016-01-04 Thread Anthony Smith
Hi, Thanks for the response I dont get what you mean, can you provide an example. I have search the net and the group but unable to find an example cheer Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h

[web2py] Re: SQLFORM security question

2016-01-04 Thread Joe
Thanks very much Anthony, I appreciate the detailed explanation. This is what my understanding was as well, but I wasn't 100% sure. In my case, the input was user contact info and some text submitted by the form and kept in the db records and not written back to a web page. But this brings up a

[web2py] Re: Prevent the automatic rendering of LOAD function

2016-01-04 Thread Jason Solack
Thank you very much, this is what i needed! On Monday, January 4, 2016 at 5:07:37 PM UTC-5, Anthony wrote: > > If you use the LOAD() helper, the component will load immediately. If you > instead want to trigger a component to load at some other time, just create > an empty div with an id: > > >

[web2py] Re: GRID selectable inside component

2016-01-04 Thread Krzysztof Socha
Ok. I think I got it... I started developing my application long time ago based on a welcome app. I have updated web2py regularly, but I have not updated original welcome application files that are specific to web2py, such as web2py.js It appears that there have been changes there as well, but

Re: [web2py] new redis_tools, new redis-backed scheduler

2016-01-04 Thread Niphlod
was just merged in trunk. On Monday, January 4, 2016 at 6:02:51 PM UTC+1, José L. wrote: > > This is really interesting, specially the scheduler and the possibility of > sharing the redis connection. > Is there any ETA to have it in stable? > > Thanks Niphlod > > 2016-01-03 0:44 GMT+01:00 Niphlod

[web2py] Re: WSGI & Web2py

2016-01-04 Thread Niphlod
plllase use github. googlecode is dead. and if you want to make yourself a favour, ditch apache and go nginx+uwsgi. https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh On Monday, January 4, 2016 at 9:23:11 PM UTC+1, Tom Lancaster wrote: > > Hey, > > Apologi

[web2py] Re: Prevent the automatic rendering of LOAD function

2016-01-04 Thread Anthony
If you use the LOAD() helper, the component will load immediately. If you instead want to trigger a component to load at some other time, just create an empty div with an id: And to load the component via Javascript: $.web2py.component('{{=URL('mycontroller', 'mycomponent1.load')}}', 'co

Re: [web2py] Prevent the automatic rendering of LOAD function

2016-01-04 Thread Richard Vézina
web2py_component() from js... Richard On Mon, Jan 4, 2016 at 4:56 PM, Jason Solack wrote: > Hello all, > > I'm using a lot of LOADs in a current project and i'm wondering if there's > a way to not automatically render the LOAD content... as it stands now i'll > have a lot of hidden HTML and i'd

[web2py] Prevent the automatic rendering of LOAD function

2016-01-04 Thread Jason Solack
Hello all, I'm using a lot of LOADs in a current project and i'm wondering if there's a way to not automatically render the LOAD content... as it stands now i'll have a lot of hidden HTML and i'd like to only load the component when i need it. Thank you in advance, Jason -- Resources: - htt

Re: [web2py] How many sessions can a web2py app handle at once?

2016-01-04 Thread Richard Vézina
session are related to user so they are unique for each user... Richard On Mon, Jan 4, 2016 at 12:03 PM, RAGHIB R wrote: > Suppose session has variables: session.name1 and session.name2 such that > each session needs a different set of values for them. Does web2py > guarantee that there will be

[web2py] Re: Condicional Models

2016-01-04 Thread Anthony
You would probably be better off explicitly setting response.models_to_run . For example, in the first model file: response.models_to_run = [] if request.controller in ['controller1', 'controller3']: resp

Re: [web2py] Can we use a web2py app on Android mobile?

2016-01-04 Thread Richard Vézina
No... But long time ago there where some report about succeed installation of web2py into android... Though I don't think it really usefull, better write an android native app if it is what you are search for... web2py is for writting web application, site web which behave like an application... A

Re: [web2py] Can we use a web2py app on Android mobile?

2016-01-04 Thread RAGHIB R
Can we install web2py app on android Mobile as we install the apk files? -- 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

Re: [web2py] Can we use a web2py app on Android mobile?

2016-01-04 Thread Richard Vézina
Why not? The new welcome use BS3 which is mobile first CSS library since version 3 : http://getbootstrap.com/css/ Richard On Mon, Jan 4, 2016 at 4:20 PM, RAGHIB R wrote: > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Sour

[web2py] Can we use a web2py app on Android mobile?

2016-01-04 Thread RAGHIB R
-- 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 the Google Groups "web2py-users" group. To unsubsc

Re: [web2py] simple update of an cache.ram python dict

2016-01-04 Thread Richard Vézina
UP here! Any help would be appreciate... Richard On Mon, Dec 21, 2015 at 10:22 PM, Richard wrote: > Hello, > > I am still under 2.9.5, I have a simple dict cached in ram which never > expire that I update when new key value are added to the system... Mainly > the dict contain id and their repr

Re: [web2py] Re: why you should upgrade to web2py 2.13.4

2016-01-04 Thread Richard Vézina
Looks good with limited testing over here too... Richard On Sun, Jan 3, 2016 at 11:15 PM, Richard Vézina wrote: > Will try it tomorrow... > > :) > > Richard > > On Thu, Dec 31, 2015 at 3:01 PM, Dave S wrote: > >> >> >> On Tuesday, December 29, 2015 at 6:34:38 PM UTC-8, Dave S wrote: >>> >>> >>

[web2py] Re: Translation of the Online Book (to German) and general question about how to translate Wiki Pages

2016-01-04 Thread St. Pirsch
There is a good tutorial in the web2py cookbook: https://books.google.de/books?id=cwjpG47z_7IC&printsec=frontcover&hl=de&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false Chapter "Using cookies to set the language" https://books.google.de/books?id=cwjpG47z_7IC&printsec=frontcover&hl=de&source=g

Re: [web2py] Translation of the Online Book (to German) and general question about how to translate Wiki Pages

2016-01-04 Thread Richard Vézina
Though I wouldn't take this path because you will make your app really painful to maintain... I would rather write a web2py component where you can detect default language and propose tutorial which explain how the user can set his preferred browser language. Then the only thing you have to do, i

Re: [web2py] Condicional Models

2016-01-04 Thread Richard Vézina
Did you try first to activate lazy_table? It brings a lot of improvment of performance and I am not sure you will feel much more improvement with subfolder conditional models... Combining to the fact that your will not be DRY that much anymore for the reason you expose, I think you should stick wit

Re: [web2py] Translation of the Online Book (to German) and general question about how to translate Wiki Pages

2016-01-04 Thread Richard Vézina
About forcing translation : You will need to manually control translation with T.accepted_language I guessm, Doc here : http://web2py.com/books/default/chapter/29/04/the-core?search=T.accepted_language if T.accepted_language.split('-')[0] == 'en': # english UI stuff elif T.accepted_language

[web2py] WSGI & Web2py

2016-01-04 Thread Tom Lancaster
Hey, Apologies for the possible dumb question. Setting up Apache/WSGI & Web2py and all works fine during setup using this script https://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh. After setup when a page is accessed, an internal error (500) code is issued. Inspecting the logs sho

[web2py] Condicional Models

2016-01-04 Thread Marcelo Theodoro
I'm working on a project that has a lot of table definitions. For reasons of better performance and design, I've decided to use Condicional models. The problem is: Each one of the controllers, needs more than one model, and each model is used by more than one of the controllers. Something like:

[web2py] Fill automatically SQLFORM with data from database based on drop down list choice

2016-01-04 Thread mannherr00
Hello Everyone ! I'm beginner with web2py. I'm writing a code to sell product. My question is about the billing form (SQLFORM on 'db.bill'). Each time a product (represented by it's 'code') is chosen from the drop down list, I'd like to able to find the corresponding product in the 'product' tabl

[web2py] no db connection in shell in web2py administrative interface

2016-01-04 Thread Richard Knight
I'm new to Web2py - I need a web-based database front-end for a project, and Web2py looks great and easy to learn. I've been working through Massimo's Web2py video course, but when (in section 5) he clicks on the 'Shell' button (under Controllers) - he enters 'db' at the >>> prompt and gets a re

[web2py] Translation of the Online Book (to German) and general question about how to translate Wiki Pages

2016-01-04 Thread Jörg Schneider
At first I want to offer my help to translate the online book to German language (in the "books"-menu there is a translation of the Preface-Chapter of the 4th edition). Second one is a newbie-question (I'm not a programmer so please be patient with me and provide me with the right reading matte

[web2py] Right use of IS_IN_DB and its "_and" parameter

2016-01-04 Thread Marcelo Huerta
I have the following definition in a table referencing the auth_user table. I try to create a table of VALOR_ESTADOS = ( 'inactivo', 'activo', 'vacaciones', 'desarrollo', 'edición', 'otro', ) db.define_table('estado', Field ('evaluador',

Re: [web2py] Encoding while reading postgres data

2016-01-04 Thread Richard Vézina
>From js directly? I not really good with js but I guess there is encoding too... From web2py you can't since everything use byte (str('byte string')) and not unicode (u'your properly encoded string')... So if you pass data from web2py what I showed you is the way of doing it... Richard On Mon, J

Re: [web2py] Encoding while reading postgres data

2016-01-04 Thread Yebach
Ok, but I would like to already see the right endocing when I get data from server database? On Monday, January 4, 2016 at 5:39:32 PM UTC+1, Richard wrote: > > When passing data from python to javascript I guess you will need to use > unicode or decode > > try > > javascritp_string_var = s.dec

[web2py] How many sessions can a web2py app handle at once?

2016-01-04 Thread RAGHIB R
Suppose session has variables: session.name1 and session.name2 such that each session needs a different set of values for them. Does web2py guarantee that there will be no conflicts between all sessions. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

Re: [web2py] new redis_tools, new redis-backed scheduler

2016-01-04 Thread José Luis Redrejo
This is really interesting, specially the scheduler and the possibility of sharing the redis connection. Is there any ETA to have it in stable? Thanks Niphlod 2016-01-03 0:44 GMT+01:00 Niphlod : > Once PR1158 gets merged > web2py will have a preferred

Re: [web2py] Encoding while reading postgres data

2016-01-04 Thread Richard Vézina
When passing data from python to javascript I guess you will need to use unicode or decode try javascritp_string_var = s.decode('utf8') Or javascritp_string_var = unicode(s, 'utf8') Richard On Mon, Jan 4, 2016 at 11:34 AM, Yebach wrote: > Hello > > I have the following scenario. > > Databa

[web2py] Encoding while reading postgres data

2016-01-04 Thread Yebach
Hello I have the following scenario. Database is PostgreSQL, encoding set to UTF-8 When I read data from database with web2py I get a string reading in type of *Bolni\xc4\x8dar* where it was suppose to be *Bolničar*. Now, when i use web2py to present data in my view is all fine (so I can see

[web2py] Re: SQLFORM security question

2016-01-04 Thread Anthony
By default, SQLFORM protects against cross-site request forgery attacks (via a hidden _formkey field, with a matching formkey value in the session). And the DAL protects against SQL injection when making database inserts. However, at form submission/database-insert time, nothing prevents users

Re: [web2py] how to get old version

2016-01-04 Thread Richard Vézina
Github! Richard On Mon, Jan 4, 2016 at 11:23 AM, Yoel Benitez Fonseca wrote: > h!, how can i get the old versions of web2py, on > http://web2py.com/init/default/download u can only get the latest but > i want one concrete version. > > -- > Yoel Benítez Fonseca > http://redevil.cubava.cu/ > $ py

[web2py] how to get old version

2016-01-04 Thread Yoel Benitez Fonseca
h!, how can i get the old versions of web2py, on http://web2py.com/init/default/download u can only get the latest but i want one concrete version. -- Yoel Benítez Fonseca http://redevil.cubava.cu/ $ python -c "import this" -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

Re: [web2py] Re: How to update app keeping the database intact

2016-01-04 Thread Richard Vézina
Ah ok, related topic with a different twist... I get there is no easy way or dictated way of achieving this... I guess depending of the the changes you made you will have to figure out what change to the backend you may have made that you will have to regress gracefully in order to make sure that y

Re: [web2py] Re: How to update app keeping the database intact

2016-01-04 Thread Ron Chatterjee
Thanks for your inputs but may be I didn't explain the problem right. I am not worried about auto migration. Here is a scenario, let's say I have 100 users and they are using the site daily. I wrote a "def" function but that breaks the current front end installation (in other words, just the pyt

Re: [web2py] Re: How to update app keeping the database intact

2016-01-04 Thread Richard Vézina
Don't understand exactly what the core of your issue... You ask how to handle deliver new version for a staging/production system while making sure you don't messup the DB with web2py automigration feature? If so, one of the answer is backup/backup/backup... Before making any new deployement you

Re: [web2py] web2py and authomatic (OAtuh 1 & 2)

2016-01-04 Thread Carlos Cesar Caballero Díaz
I like it, unfortunately right now I only can test it if there is some way to run it against a diggest proxy in a linux distribution... PD: Happy new year to every one!! El 29/12/15 a las 04:48, Massimo Di Pierro escribió: I made a PR for authomatic that include an adapter and example to use a

[web2py] Re: web2py 2.13.3 is OUT

2016-01-04 Thread Jacinto Parga
I have solved it. I have removed *logging.conf* file from the web2py folder, but I don't know if it has undesidered consecuences! Can it be harmful? Thanks! El lunes, 4 de enero de 2016, 11:52:22 (UTC+1), Jacinto Parga escribió: > > Hi, > > I upgraded from 2.11.2 > > I get a error ticket wh

[web2py] Re: SQLFORM security question

2016-01-04 Thread Joe
I the db record text I had this: *sometext*+*www.mydomain.com *@ *sometext.com *http://*sometext*.com/?url=*www.mydomain.com *&id=e318 ..and more similar type of code. The input was long and it looked like a cross site scri

[web2py] Re: How to update app keeping the database intact

2016-01-04 Thread Ron Chatterjee
db is on the hosting platform. Question is related to what happens after the deployment? On Monday, January 4, 2016 at 4:36:30 AM UTC-5, Niphlod wrote: > > where is the db ? > > On Monday, January 4, 2016 at 7:17:07 AM UTC+1, Ron Chatterjee wrote: >> >> >> Happy New Year Everyone, >> >> I want t

[web2py] Re: web2py 2.13.3 is OUT

2016-01-04 Thread Jacinto Parga
Hi, I upgraded from 2.11.2 I get a error ticket when I deploy to GAE: Traceback (most recent call last): File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py" , line 240, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler(

[web2py] Re: SQLFORM security question

2016-01-04 Thread Niphlod
it's the same code. A call to http://yoursite/yourapp/controller/function?url=something&id=somethingelse would not pass validation as SQLFORM is CSRF protected. If you are sure that that call got a record into the db, something is really wrong with your application as web2py doesn't allow it ou

[web2py] Re: SQLFORM security question

2016-01-04 Thread Joe
Thanks very much Niphlod, So, the special characters in the user input showing up in the table records text is basically harmless, right? That's what I though. Thanks for the correct code. I actually thought the code was: *form = SQLFORM(db.table).process() * *if form.accepted:* do somethin

[web2py] Re: Side by Side a Form and a Grid

2016-01-04 Thread Niphlod
you'd have to resort to create a two-column layout and insert the two grids on different columns. using the scaffolding app, something like this should suffice column #1 column #2 On Monday, January 4, 2016 at 9:48:26 AM UTC+1, Anthony Smith wrote: > > Hi all, > > Hope you have all had a won

[web2py] Re: SQLFORM security question

2016-01-04 Thread Niphlod
any SQLFORM is csrf protected so those kind of attempts resulted in nothing. the "correct code" is form = SQLFORM(db.table) if form.process().accepted: do something elif form.errors: error # this is probably where that call ended return dict(form=form) On Monday, January 4, 2016 at

[web2py] Re: How to update app keeping the database intact

2016-01-04 Thread Niphlod
where is the db ? On Monday, January 4, 2016 at 7:17:07 AM UTC+1, Ron Chatterjee wrote: > > > Happy New Year Everyone, > > I want to understand what everyone think about this problem. Let's say I > have an app installed in python anywhere. I have few users. There are some > changes to my app or

[web2py] Side by Side a Form and a Grid

2016-01-04 Thread Anthony Smith
Hi all, Hope you have all had a wonderful start to the New Year. What is the best way to have a form and gird to appear side side on the same page. I am totally lost. Thanks everyone Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/we

[web2py] Re: Changing navbar color

2016-01-04 Thread RAGHIB R
Didn't work. -- 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 the Google Groups "web2py-users" gro

Re: [web2py] Why this doesn't work as expected?

2016-01-04 Thread RAGHIB R
@marin it worked. Thanks for your help so sensibly. -- 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 t

Re: [web2py] Why this doesn't work as expected?

2016-01-04 Thread RAGHIB R
Thank you so much. It just worked. Thanks a lot. -- 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 t