Re: [web2py] Re: schema database support for the DAL

2013-10-21 Thread Johann Spies
+1 -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- 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: new feature in trunk

2013-10-21 Thread Mirko
Hi Massimo, this is a very promising feature ! My quick two cents: Why not turn this generic by replacing the 'body' field with a 'node_name' field and add an attribute node table ? For example: db.define_table('node', Field('parent_id','reference node'), Field('

[web2py] Re: Virtual.Method/Field and Selects

2013-10-21 Thread Zach
Thanks a lot for your help Anthony . This worked like a charm. I chose this since I think it is a more tidy approach - everything that have to do with database definition is defined in just one place. There isn't much of an overhead anyway. Again thanks a lot. On Friday, October 18, 2013 4:0

[web2py] Application not OK after upgrade from 2.5.1 to any posterior release...

2013-10-21 Thread pkomor
Hello. I have an application that runs fine in web2py 2.5.1, I have upgraded web2py, I disabled migrations and activated after (I don't have fields in the model without the param length), but now when I login with an user created during the initial setup application, all is fine, but when any o

[web2py] Re: Instant press 2.1.0 holiday edition (?)

2013-10-21 Thread Jesus Alvaro
Hi Martin Congrats for your work I need a colaborative wiki for my new projects: http://stringscore.fauno.org/ @ http://computermusiclab.org/ As starting point I am using auth.wiki(), but a whole wiki+comments+permissions is required I'd like to use InstantPress. I like it very much, and also

[web2py] Re: ask response.models_to_run

2013-10-21 Thread 黄祥
thank you so much for your hints and detail explaination, anthony. i've separated my models and changed my code into: models/db.py if request.controller == 'default' and request.function == 'index' : response.models_to_run = ['db_wizard_company.py', 'db_wizard_service.py', 'menu.py'] elif reque

Re: [web2py] Help me test model subfolders

2013-10-21 Thread Johann Spies
Hallo Massimo, There is a problem with sorting of model subfolders in 2.7.2. We made some > changes in trunk. > After this morning's updates from the trunk I got problems for the first time which reflected a sorting problem: Traceback (most recent call last): File "/home/js/web2py/gluon/restr

Re: [web2py] Help me test model subfolders

2013-10-21 Thread Johann Spies
On 21 October 2013 11:20, Johann Spies wrote: > In the end I go the app working again by doing: > > > hg rename db.py 0db.py > > hg rename dbcommon.py 0dbcommon.py > > I have talked too soon. The admin interface works with this setup but still not the app itself. I will have to revert to last

[web2py] Issues with creating a hash...

2013-10-21 Thread Jason (spot) Brower
I have the following in my controller... # -*- coding: utf-8 -*- def validate_message(recieved_data, message_hash): secret_salt = "12345" import hashlib m = hashlib.sha224() m.update(recieved_data + secret_salt) hashed_message = m.digest() if message_hash == hashed_message:

[web2py] autocomplete widget on multiple fields display issue

2013-10-21 Thread Jose C
Issue: When setting the autocomplete widget on two fields in same form, the dropdown box always appears underneath the first field only, even if the second field is selected and typing into the second field. Values are inserted into the correct fields and form submission works ok... it's just

[web2py] Re: new feature in trunk

2013-10-21 Thread Niphlod
ouch the easiest model to update, the worst to query. I was going to post a plugin for threaded comments but then life kicked in with lots of other requirements, and then other things got priority in web2py. I don't think this will be compatible with what I've done 'cause I use a totally di

Re: [web2py] Re: schema database support for the DAL

2013-10-21 Thread Niphlod
PR got in. you should start to test. right now it works just for table names. On Monday, October 21, 2013 9:25:05 AM UTC+2, Johann Spies wrote: > > +1 > > > -- > Because experiencing your loyal love is better than life itself, > my lips will praise you. (Psalm 63:3) > -- Resources: - http:

[web2py] Re: cache.action questions (views with db selects, and different views for logged-in users)

2013-10-21 Thread Niphlod
On Monday, October 21, 2013 8:25:22 AM UTC+2, Mark Li wrote: > > I have 2 questions about cache.action > > Firstly, I am looking into cache.action to cache several static pages > (about, contact, etc), that rarely change content. > > For users who aren't logged in, the pages would be the same. H

Re: [web2py] Help me test model subfolders

2013-10-21 Thread Johann Spies
It seems that when the app is working, the admin interface does not and vice versa. I went back to last weeks version (Version 2.7.4-stable+timestamp.2013.10.16.09.10.20) and the error is still the same. So the problem was not with this morning's edition. I just did not use the admin interface si

[web2py] Re: cache.action questions (views with db selects, and different views for logged-in users)

2013-10-21 Thread Anthony
> Secondly, cache.action can't be used to cache views with database selects. >> However, if the database select was converted to a list/dict, with >> as_list() or as_dict(), would caching the page with cache.action be >> possible (this would make it pickleable as a regular dictionary)? >> > >

[web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-21 Thread Gael Princivalle
Hi. Is it possible to use Bootstrap 2.3.2 on web2py ? I would like to do it just to have an easiest css Bootstrap file to read/modify. With web2py there's just the min 2.2.2 version that's not so easy to modify. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: cache.action questions (views with db selects, and different views for logged-in users)

2013-10-21 Thread Anthony
> For users who aren't logged in, the pages would be the same. However, if a > user is logged in, then there are links to the users' profile, as well as a > logout link; thus making the page different for every user, and different > for logged-in vs. non-logged-in users. Is there any way to ef

[web2py] Question on SQLFORM.grid layout update

2013-10-21 Thread Sarbjit
I am using SQLFORM.grid and smartgrid for viewing the records, I noticed that when I use view record button, the text seems to be on right side making the left side of the screen empty. It looks like Name : John

[web2py] Re: Problems with Scheduler/ComfortScheduler Monitor setup on a different server than website

2013-10-21 Thread DeanK
Awesome thanks. Everything is working now. I've used the scheduler monitor a decent amount and it has worked pretty well for me. This is the first bug I've noticed but if I find more I'll be sure to let you know. The only tweak I've made is the output from my tasks contains lots of debug info

[web2py] Re: Problems with Scheduler/ComfortScheduler Monitor setup on a different server than website

2013-10-21 Thread Niphlod
uhm. what if you do {{=PRE(r_.run_output)}} Without an example it's hard to guess what should be the correct "style". On Monday, October 21, 2013 4:26:54 PM UTC+2, DeanK wrote: > > Awesome thanks. Everything is working now. > > I've used the scheduler monitor a decent amount and it has worked p

[web2py] Re: web2py and PIL: The _imaging C module is not installed

2013-10-21 Thread Leonel Câmara
Remove PIL from your app modules folder and just add it to your python installation by simply installing it. I would also recommend going with pillow instead of regular PIL as they fixed quite a lot of very old bugs. You can get a windows pillow version here: http://www.lfd.uci.edu/~gohlke/pyth

[web2py] Recipe - How to add/remove items from a popup windows

2013-10-21 Thread Fernando Ruscitti
Hi. I'm working on an application where I have a main window with several fields and Objetives. The objetives should be selected from a popup windows (or maybe a opending div) when the user click 'add/remove objetives'. Do you know what is the best way to manage this from web2py? The steps are:

Re: [web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-21 Thread Junior Phanter
I use Bootstrap v2.3.2 on Web2py. It's ok. 2013/10/21 Gael Princivalle > Hi. > > Is it possible to use Bootstrap 2.3.2 on web2py ? I would like to do it > just to have an easiest css Bootstrap file to read/modify. With web2py > there's just the min 2.2.2 version that's not so easy to modify. >

[web2py] Re: Question on SQLFORM.grid layout update

2013-10-21 Thread Cliff Kachinske
You can use Firebug to look at the css classes and their attributes. You can also change them on the fly to see the results. On Monday, October 21, 2013 9:49:09 AM UTC-4, Sarbjit wrote: > > I am using SQLFORM.grid and smartgrid for viewing the records, I noticed > that when I use view record bu

[web2py] Re: grid: readable for columns and backgroundcolors for rows

2013-10-21 Thread Cliff Kachinske
For question #1, parse the request.args. I use the following with smartgrid, but grid should work similar: def index(): fields = None # Shows all fields if len (request.args) > 2 and request.args = ['sometable', 'new', 'sometable'] fields = [db.sometable.this, db.sometable.that,

Re: [web2py] Re: grid: readable for columns and backgroundcolors for rows

2013-10-21 Thread Martin Weissenboeck
Good idea, thank you! 2013/10/21 Cliff Kachinske > For question #1, parse the request.args. I use the following with > smartgrid, but grid should work similar: > > def index(): > fields = None # Shows all fields > if len (request.args) > 2 and request.args = ['sometable', 'new', > 'some

[web2py] Re: ERROR: pickle data was truncated; db table name error.

2013-10-21 Thread Kalvis Bruns
Thank you, I deleted the file, and changed the db.define_table like this: db.define_table('NFobj', ..., migrate = False, fake_migrate = True ) As long as I leave these settings like this, everything works. I wonder is there any case or an action witch I will not be able to accomplis

[web2py] Mercurial creating new apps?

2013-10-21 Thread User
I have cloned the web2py mercurial repository and hg updated to R-2.7.4. I'm using TortoiseHg on windows. Now when I want to create a new application based on the welcome app how should I go about doing this? what is the normal workflow for this? I'm guessing the idea is that I would create

[web2py] Re: Application not OK after upgrade from 2.5.1 to any posterior release...

2013-10-21 Thread Massimo Di Pierro
Can you try delete all session files? On Monday, 21 October 2013 02:58:13 UTC-5, pkomor wrote: > > Hello. I have an application that runs fine in web2py 2.5.1, I have > upgraded web2py, I disabled migrations and activated after (I don't have > fields in the model without the param length), but n

[web2py] Re: new feature in trunk

2013-10-21 Thread Massimo Di Pierro
Actually mine was an example. as_trees() does not dictate a model. The only requirement is that the model must have a self referencing field. You can call it any way you like it. You can pass its name as first argument of as_trees(). On Monday, 21 October 2013 05:55:44 UTC-5, Niphlod wrote:

Re: [web2py] Help me test model subfolders

2013-10-21 Thread Massimo Di Pierro
I do not understand. You have r'^\db\.py$', shouldn't this be? r'^db\.py$', On Monday, 21 October 2013 04:20:01 UTC-5, Johann Spies wrote: > > Hallo Massimo, > > > There is a problem with sorting of model subfolders in 2.7.2. We made some >> changes in trunk. >> > > After this morning's

Re: [web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-21 Thread Massimo Di Pierro
If somebody sends me a git pull request, I will apply it but shouldn't we jump to bootstrap 3? On Monday, 21 October 2013 11:06:06 UTC-5, Junior Phanter wrote: > > I use Bootstrap v2.3.2 on Web2py. > It's ok. > > > 2013/10/21 Gael Princivalle > > >> Hi. >> >> Is it possible to use Bootstrap 2.3.2

Re: [web2py] Re: new feature in trunk

2013-10-21 Thread Richard Vézina
That cool Massimo! Thanks for this... Richard On Mon, Oct 21, 2013 at 3:26 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Actually mine was an example. as_trees() does not dictate a model. The > only requirement is that the model must have a self referencing field. You > can call

Re: [web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-21 Thread Ykä Marjanen
I would vote for bootstrap 3 as it is simpler to implement and use. With the current guidance and the layout template it is pretty easy to customize to any framework already. So I would only focus on improving the documentation, especially for customizing the forms and errors. Then people can c

[web2py] grid in component only works in Firefox

2013-10-21 Thread Jim S
I have the following in my component controller: form = SQLFORM.factory(Field('productSiteId', db.productSite, label='Add-on', required=True, requires=requires), Field('quantity', 'decimal(9,4)', label='at'),

Re: [web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-21 Thread Niphlod
Need to change all widgets to pass to bootstrap3. I remember someone working on itbut of course it's keeping for himself :-P Before doing that (pass to 3), we should figure out: - something to set all methods for formstyle to be homogeneous among all the app - a contrib "way" to make module

Re: [web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-21 Thread Paolo Caruccio
twbs versions after the 2.2.2 up to 2.3.2 did not introduce significant changes. Version 3.0, instead, is a revolution. We can say that is a different framework. Consequently, although it is easy to create a layout based on twbs 3.0, it is complicated to adjust some components that are pre-buil

[web2py] Re: grid in component only works in Firefox

2013-10-21 Thread Niphlod
how can opera chunk out part of html ? if you point opera to /infocenter/applications/product_addon.load?workorderId... what do you get back ? On Monday, October 21, 2013 10:35:41 PM UTC+2, Jim S wrote: > > Found a little more. Look at the two attachments. One is the generated > html fro

Re: [web2py] Bootstrap 2.2.2 / 2.3.2

2013-10-21 Thread Niphlod
PR sent for 2.3.2 . PS: maybe we should move the discussion to web2py-developers on the plans to easy up working with new css frameworks and web2py On Monday, October 21, 2013 10:55:34 PM UTC+2, Paolo Caruccio wrote: > > twbs versions after the 2.2.2 up to 2.3.2 did not introduce significant >

[web2py] Interactive maps using HTML5 data tags, no coding!

2013-10-21 Thread Tim Michelsen
Hello, this is an ideal library for working with web2py & maps: Interactive maps using HTML5 data tags, no coding! http://geo5.org/ Kind regards, Timmie -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

[web2py] smartgrid linked list custom buttons

2013-10-21 Thread James Burke
Hi, I'd like to have my links to child tables in the smartgrid displayed as buttons (like view/edit/delete) rather than links. I'd also like to add icons. Is there an specific way to do this, or do I need to create them using links instead? Cheers, -James -- Resources: - http://web2py.com

Re: [web2py] Re: grid in component only works in Firefox

2013-10-21 Thread Jim Steil
It works fine. Also, the data input elements are all displayed appropriately, just doesn't work when I click on submit to try to add something. But, works fine in Firefox. On Mon, Oct 21, 2013 at 4:07 PM, Niphlod wrote: > how can opera chunk out part of html ? > if you point opera to > > /inf

Re: [web2py] Re: grid in component only works in Firefox

2013-10-21 Thread Jim S
Should also mention that I updated to the latest web2py this morning, running 2.7.4-stable+timestamp.2013.10.21.14.31.25. -Jim On Monday, October 21, 2013 4:26:36 PM UTC-5, Jim S wrote: > > It works fine. Also, the data input elements are all displayed > appropriately, just doesn't work when I

[web2py] Re: Interactive maps using HTML5 data tags, no coding!

2013-10-21 Thread Niphlod
this is pretty awesome. On Monday, October 21, 2013 11:23:38 PM UTC+2, Timmie wrote: > > Hello, > this is an ideal library for working with web2py & maps: > > Interactive maps using HTML5 data tags, no coding! > http://geo5.org/ > > Kind regards, > Timmie > > -- Resources: - http://web2py.

Re: [web2py] Re: grid in component only works in Firefox

2013-10-21 Thread Niphlod
this means that in Opera the product_addon.load shows the tag ? On Monday, October 21, 2013 11:26:36 PM UTC+2, Jim S wrote: > > It works fine. Also, the data input elements are all displayed > appropriately, just doesn't work when I click on submit to try to add > something. But, works fine i

[web2py] Re: Mercurial creating new apps?

2013-10-21 Thread Dave S
On Monday, October 21, 2013 12:15:05 PM UTC-7, User wrote: > > I have cloned the web2py mercurial repository and hg updated to R-2.7.4. > I'm using TortoiseHg on windows. Now when I want to create a new > application based on the welcome app how should I go about doing this? what > is the norm

[web2py] OFF Topic - json online generator for testing purpose

2013-10-21 Thread António Ramos
Nice to test some code against a json feed http://www.filltext.com/ -- 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

[web2py] Re: smartgrid linked list custom buttons

2013-10-21 Thread Dave S
On Monday, October 21, 2013 2:24:02 PM UTC-7, James Burke wrote: > > Hi, > > I'd like to have my links to child tables in the smartgrid displayed as > buttons (like view/edit/delete) rather than links. I'd also like to add > icons. > > Is there an specific way to do this, or do I need to create t

[web2py] Re: smartgrid linked list custom buttons

2013-10-21 Thread James Burke
Thanks Dave. Unfortunately they didn't use the term 'buttonification' in their thread. =) -- 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 t

[web2py] Re: cache.action questions (views with db selects, and different views for logged-in users)

2013-10-21 Thread Mark Li
Thanks Niphlod and Anthony! That answered my question about caching views with database selects. However, my problem with client-side caching differently for logged-in and non-logged in users is still a problem. Niphlod, I'm not sure what you're referring to by the "user" parameter. The closet

[web2py] Re: Mercurial creating new apps?

2013-10-21 Thread User
When I click the "Versioning" link I get "Sorry, could not find mercurial installed" although I have TortoiseHg installed. Does this work for you? On Monday, October 21, 2013 5:56:28 PM UTC-4, Dave S wrote: > On Monday, October 21, 2013 12:15:05 PM UTC-7, User wrote: >> >> I have cloned the web

[web2py] Re: cache.action questions (views with db selects, and different views for logged-in users)

2013-10-21 Thread Anthony
> Niphlod, I'm not sure what you're referring to by the "user" parameter. > The closet parameters to "user" would be "session" and "public". But I > don't see these options helping to differentiate between logged in and > non-logged for caching. > The "session" arg doesn't differentiate betwe

[web2py] failed to compile file because: IndentationError at line # at char # expected an indented block

2013-10-21 Thread raferbop
Good day Guys, I am currently trying to run the authorize.net credit processing example, but I am getting some indentation errors with the following lines of code; if form.accepts(request,session): if process(form.vars.creditcard,form.vars.expiration, total,form.vars

[web2py] Re: failed to compile file because: IndentationError at line # at char # expected an indented block

2013-10-21 Thread Massimo Di Pierro
Unless you have a compelling reason to use authorize.net, consider using stripe.com and the new gluon/contrib/stripe.py With stripe the card info never reaches your server and you are automatically PCI compliant. On Monday, 21 October 2013 19:22:33 UTC-5, raferbop wrote: > > > > Good day Guys

[web2py] Re: failed to compile file because: IndentationError at line # at char # expected an indented block

2013-10-21 Thread raferbop
Thanks Massimo On Monday, October 21, 2013 8:57:32 PM UTC-5, Massimo Di Pierro wrote: > > Unless you have a compelling reason to use authorize.net, consider using > stripe.com and the new gluon/contrib/stripe.py > > With stripe the card info never reaches your server and you are > automatically

[web2py] Re: failed to compile file because: IndentationError at line # at char # expected an indented block

2013-10-21 Thread Massimo Di Pierro
Somebody should turn this into a web2py slice but here is some code example: # in models/db.py db.define_table( 'sale', # optional fields ... Field('amount_paid','double',default=0.0,writable=False,readable=False), Field('balance_due','double',default=0.0,writable=False,readabl

[web2py] Re: Mercurial creating new apps?

2013-10-21 Thread Dave S
On Monday, October 21, 2013 4:34:08 PM UTC-7, User wrote: > > When I click the "Versioning" link I get "Sorry, could not find mercurial > installed" although I have TortoiseHg installed. Does this work for you? > > I'm running on a Linux system, so I have Mercurial without any Tortoises. I migh

[web2py] Re: smartgrid linked list custom buttons

2013-10-21 Thread Dave S
On Monday, October 21, 2013 3:44:16 PM UTC-7, James Burke wrote: > > Thanks Dave. > > Unfortunately they didn't use the term 'buttonification' in their thread. > =) > > Perhaps not, but a GG search for "CSS button" turned up these 3 threads which might be relevant: http://groups.google.com/d/

[web2py] Re: Question on SQLFORM.grid layout update

2013-10-21 Thread Sarbjit
Thanks Cliff, Firebug was really powerful. It solved my problem in seconds. -Sarbjit On Monday, October 21, 2013 11:48:41 PM UTC+5:30, Cliff Kachinske wrote: > > You can use Firebug to look at the css classes and their attributes. You > can also change them on the fly to see the results. > > O

[web2py] Re: smartgrid linked list custom buttons

2013-10-21 Thread James Burke
Perhaps my question isn't very well defined. When defining a linked table in a smartgrid like so: linked_tables = dict(supply=['file']) results in: Files I want it to be like this (how the view/edit/del buttons are): Files I know I could just define them in the links argument: links = dict(sup

[web2py] Re: new feature in trunk

2013-10-21 Thread webpypy
very nice what about the display of the tree in the view ? maybe as a column in a table. -- 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 recei

[web2py] Re: Unable to join more than one table in SQLForm.grid

2013-10-21 Thread Jayakumar Bellie
How does that matter the my query? I have to give some where condition. Can you elaborate. On Friday, October 18, 2013 9:05:06 PM UTC+5:30, villas wrote: > > HI Jayakumar > > Try using a query rather than a rows object. > > For example, rather than: > query = db().select(db.auth_user.ALL) #

Re: [web2py] Help me test model subfolders

2013-10-21 Thread Johann Spies
On 21 October 2013 21:28, Massimo Di Pierro wrote: > I do not understand. You have > > r'^\db\.py$', > > shouldn't this be? > > r'^db\.py$', > > > Yes it should be. Thanks. But that does not make any difference to the result: python web2py.py -M -S nkb/akb web2py Web Framework Created by Mass

[web2py] summary of session optimisations

2013-10-21 Thread Tim Richardson
I'm trying to understand better some of the tips for session optimisation. I've read the book and explored this group. Any improvements and corrections would be appreciated. * It seems that web2py needs sessions most of them when users are logged in, if we're following recommendations for signe

[web2py] Re: Application not OK after upgrade from 2.5.1 to any posterior release...

2013-10-21 Thread pkomor
I have deleted all sessions files, I have packaged the application with 2.5.1 and restored in web2py > 2.5.1, deleting session files, I have made an initial setup of the application with a new database migration, but the result is the same. I think the only thing that application does "abnormal