[web2py] Re: Tree view, Rendering

2012-04-03 Thread mart
do you mean that you are looking to parse a directory structure (7 dirs deep) and dump the results to tables ? On Monday, April 2, 2012 8:21:12 PM UTC-4, Simon Ashley wrote: Pretty new to this and stumbling a little. We need to generate a Treeview structure with the bottom node ending with

[web2py] represent in form

2012-04-03 Thread Annet
In db.py I have a table Address which references a table Organization to display the organization name rather then the nodeID I set a validator: db.Address.nodeID.represent=lambda nodeID, row: db(db.Organization.nodeID==nodeID).select().first().name In 'database db select' Address.nodeID is

[web2py] Re: web2py and apache

2012-04-03 Thread Todor Todorov
Hello netcode, The backslash at the end of the line means that the command continues at the next line. Therefore eighter put everything at one line, but remove \, or issue the command exactly as typed in your example. The command ... ln -s creates a simbolic link in Unix/Linux. Simbolic

Re: [web2py] adding an item in a list:reference :

2012-04-03 Thread Manuele Pesenti
Il 02/04/2012 16:05, bussiere adrien ha scritto: ok i thought about this too. But when you have a long list that's not really nice. And it take twolines. Summon Massimo can't we make a one line methode to do that ? c'mon two lines are not too

[web2py] Re: compiling web2py app

2012-04-03 Thread netcode
cant post the error message cos it comes up as a flash message and disappears in a minute seconds. On Monday, 26 March 2012 11:52:12 UTC+1, Alan Etkin wrote: Could you post the errors you get when compiling? Perhaps you can use the installer administrative interface facility (w2p files)

[web2py] Data Tables versus SQLFORM.grid

2012-04-03 Thread Annet
At the moment I am using Alan Jardines Data Tables, it allows me to generate the following table: div class=ez-box box_pad adm_alt_pagination table id=adm class=display style=font-size: 0.9em; thead /thead tbody {{for row in rows:}} tr td

[web2py] Re: Prevent mobile rendering on iPad/Tablets

2012-04-03 Thread Annet
If so, when will this happen? Note, there's talk of switching the welcome app to Twitter Bootstrap 2.0, which also has a responsive grid -- if you use that, there would be a similar procedure to disable the responsiveness for tablets. Kind regards, Annet

[web2py] Re: Tree view, Rendering

2012-04-03 Thread Simon Ashley
Nope, can probably do this as a dict/ json variable. Its the linking the to javascript stuff that was causing the concern. (attempting a dynatree solution) Could be coming the the realisation that need python plus javascript skills to make things work as a replacement for a c/s framework. On

[web2py] submit_button and SQLFORM.grid?

2012-04-03 Thread Johann Spies
How do I set the text of the submit button when selectable is used in the grid? I have tried: form = SQLFORM.grid(query, fields = fields, create = False, orderby = db.akb_articles.title, maxtextlength = 180,

Re: [web2py] Data Tables versus SQLFORM.grid

2012-04-03 Thread Johann Spies
On 3 April 2012 11:45, Annet anneve...@googlemail.com wrote: At the moment I am using Alan Jardines Data Tables, it allows me to generate the following table: div class=ez-box box_pad adm_alt_pagination table id=adm class=display style=font-size: 0.9em; thead /thead tbody

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-03 Thread Mobility
Thank you. I did again the chown command on the web2py and check the permissions but it did not work. I still get the same error. I am trying to learn how to deploy web2py on my snow leopard server not to just use to develop. Em segunda-feira, 2 de abril de 2012 21h32min17s UTC-3, pbreit

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-03 Thread Mobility
Como checo as permissões de execução no folder web2py? Em segunda-feira, 2 de abril de 2012 14h28min46s UTC-3, Ovidio Marinho escreveu: Check the permission folder ex. Grpup and owner = www-data Em segunda-feira, 2 de abril de 2012, Mobilityf...@mobility-br.com escreveu: I am new to

Re: [web2py] Data Tables versus SQLFORM.grid

2012-04-03 Thread Anthony
links = [lambda row: A('Add usder' , _href = URL('default', 'adduserl', args = [row.id]))] Note, by default, the items in the links list get added to the final column, along with the View, Edit, and Delete buttons. If you want a given

Re: [web2py] Prevent mobile rendering on iPad/Tablets

2012-04-03 Thread Jonathan Lundell
On Mar 31, 2012, at 4:16 PM, Anthony wrote: The responsive grid used in the welcome app is simply based on Skeleton (http://www.getskeleton.com/), so to change the behavior, you'll have to edit the /static/css/skeleton.css file. In particular, comment out the Tablet media query

Re: [web2py] Prevent mobile rendering on iPad/Tablets

2012-04-03 Thread Anthony
Any future development really needs to be flexible in this regard: iPads are not iPhones (and likewise for other device families). OTOH, iPads are not desktops either: they have a touch interface. A good responsive design framework should handle this properly, and not as a hack. Note,

Re: [web2py] Re: submit_button and SQLFORM.grid?

2012-04-03 Thread Anthony
Thanks Anthony. Two further questions (one nog web2py specific): 1. Will '.web2py_table' still be valid if 'divs' were used as formstyle? The entire grid is wrapped in a div with class web2py_grid. That div contains three child divs, web2py_console (for the search form, number of

[web2py] Re: ValueError: unsupported format character in login

2012-04-03 Thread Massimo Di Pierro
You have an old web2py version. This problem no longer exist. On Tuesday, 3 April 2012 03:06:48 UTC-5, Cédric Mayer wrote: Hello everyone, I'm developping an application over web2py, and I stumbled on a problem when I simply log in, using the normal auth() mechanism. It has previously

Re: [web2py] adding an item in a list:reference :

2012-04-03 Thread Massimo Di Pierro
I guess it can be done in one line but it would not change the logic db.mytable http://db.mytable.id/[1] = dict(listfield=db.mytablehttp://db.mytable.id/ [1].listfield+[newelement]) On Tuesday, 3 April 2012 03:21:26 UTC-5, Manuele wrote: Il 02/04/2012 16:05, bussiere adrien ha scritto: ok

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-03 Thread Bruno Rocha
ls -la folder-name *drwx-- 3 www-data www-data 4096 2012-02-15 01:26 .* The line above is the details for the folder the ending dot means the current or selected directory. the drwx-- means the permission set, in this case the owner of the folder (www-data) has access do* r*ead,

Re: [web2py] Tracking/Tracing actions

2012-04-03 Thread Cliff
Why do the seek(0)? Would the pointer not be at zero anyway? On Friday, March 30, 2012 6:43:14 PM UTC-4, Massimo Di Pierro wrote: yes and no. The file is not loaded in memory and then written to file. It is uploaded into temp (request.vars.field.file points to the temp file) then

Re: [web2py] db.table.update(f1='...') fine, but why I can't pass a dict : db.table.update({'f1':'...'})

2012-04-03 Thread Richard Vézina
Ho! Thanks... Richard On Tue, Apr 3, 2012 at 11:47 AM, Bruno Rocha rochacbr...@gmail.com wrote: You have to unpack the dict db.table.insert(**dict) dbset.update(**dict) In python ** unpack dict key/value Also if you want to filter the valid fields you can use the

Re: [web2py] Tracking/Tracing actions

2012-04-03 Thread Massimo Di Pierro
Yes. You should move it back back to zero after you compute the hash so that any following use finds it as zero too. On Tuesday, April 3, 2012 10:14:27 AM UTC-5, Cliff wrote: Why do the seek(0)? Would the pointer not be at zero anyway? On Friday, March 30, 2012 6:43:14 PM UTC-4, Massimo Di

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-03 Thread pbreit
Is it a problem that the users directory is wwwdata vs www-data? File /Users/wwwdata/web2py/gluon/main.py

[web2py] Re: compiling web2py app

2012-04-03 Thread pbreit
Can you ftp the files without compiling?

Re: [web2py] Re: compiling web2py app

2012-04-03 Thread OTTIH ARINZE
if i FTP the files to my domain on a shared hosting server, it does not work. It shows the files just as they are and do u think its safe to FTP the files to my domain without compiling? - Original Message - From: pbreit pbreitenb...@gmail.com To: web2py@googlegroups.com Sent: Tuesday,

[web2py] Re: ListWidget: IS_NULL_OR form.errors

2012-04-03 Thread DenesL
Hi Fran, list:integer field can not contain nulls but you can work around it, here is an example: # model def integer_null(x): if not x: return x w=[] for v in x: if v==: w.append('') else: w.append(v) return w db.define_table(test, Field(text,

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-03 Thread Mobility
I will check it out. Em terça-feira, 3 de abril de 2012 13h39min25s UTC-3, pbreit escreveu: Is it a problem that the users directory is wwwdata vs www-data? File /Users/wwwdata/web2py/gluon/main.py

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-03 Thread Mobility
I did reset the permissions with sudo chmod -R web2py (web2py folder) but still not working. Em terça-feira, 3 de abril de 2012 11h55min44s UTC-3, rochacbruno escreveu: ls -la folder-name *drwx-- 3 www-data www-data 4096 2012-02-15 01:26 .* The line above is the details for the folder

[web2py] License Question

2012-04-03 Thread SeamusSeamus
Quick question: When do I need to have powered by web2py on the bottom of my page? For my own personal projects? If I charge to use my site / app? What if I run it on a clients server and manage it for them? What if I sell the software to a company? My clients will not want Powered by Web2py

[web2py] Re: License Question

2012-04-03 Thread Anthony
Quick question: When do I need to have powered by web2py on the bottom of my page? Never. This is not a requirement of the web2py license. If you'd like to put it there, please do, but no need to. Anthony

[web2py] Re: License Question

2012-04-03 Thread SeamusSeamus
Great! Thanks for this info! On Tuesday, April 3, 2012 12:46:59 PM UTC-6, Anthony wrote: Quick question: When do I need to have powered by web2py on the bottom of my page? Never. This is not a requirement of the web2py license. If you'd like to put it there, please do, but no need to.

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-03 Thread Bruno Rocha
sudo chown -R www-data:www-data web2py On Tue, Apr 3, 2012 at 2:51 PM, Mobility f...@mobility-br.com wrote: I did reset the permissions with sudo chmod -R web2py (web2py folder) but still not working. Em terça-feira, 3 de abril de 2012 11h55min44s UTC-3, rochacbruno escreveu: ls -la

[web2py] just deployed web2py on flux flex. I have errors on database. How can I delete DBs and migrate them?

2012-04-03 Thread Kenny
I inserted databases on Fluexflex's MySql. However, I had an error while inserting them. The question is how can I delete SQL file in web2py application and insert dbs all over again? I dropped all the tables in mysql server. However web2py application has sql file that I cannot have an

Re: [web2py] just deployed web2py on flux flex. I have errors on database. How can I delete DBs and migrate them?

2012-04-03 Thread Richard Vézina
Change your db connection string to the mysql server then fake_migrate=True And get back with migrate=True. Search the book with fake_migrate for more explanation. Richard On Tue, Apr 3, 2012 at 4:26 PM, Kenny nis...@gmail.com wrote: I inserted databases on Fluexflex's MySql. However, I

Re: [web2py] just deployed web2py on flux flex. I have errors on database. How can I delete DBs and migrate them?

2012-04-03 Thread Kenny Chung
okay I will do so. Also, the error is ProgrammingError: (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option CHAR(1),\nsize CHAR(1),\nis_active CHAR(1),\ncreated_on DATETIME' at line 16)

[web2py] Re: just deployed web2py on flux flex. I have errors on database. How can I delete DBs and migrate them?

2012-04-03 Thread monotasker
I ran into analogous problems with sqlite on fluxflex. If you have a working local version of the app, would it be simplest to just re-initialize the fluxflex repo (and mysql db) and then push a fresh version of the app to the fluxflex repo? I have found that, in general, it doesn't work very

[web2py] current state of unit testing tools?

2012-04-03 Thread monotasker
I'm coming at things backwards (as usual) and just now looking at writing unit tests for a couple of apps I'm working on. The most recent forum discussion of unit testing in general seems to be about a year old and references an appliance in web2py_utils as the most complete solution to that

[web2py] Re: Tree view, Rendering

2012-04-03 Thread Niphlod
have you looked into http://dev.s-cubism.com/plugin_jstree and http://dev.s-cubism.com/plugin_mptt ? I had a requirement similar (4 level nested structure) and ended writing the logic in web2py and using jstree as a ui in the frontend.. I defintely learned some javascript in the way, but at

[web2py] Re: current state of unit testing tools?

2012-04-03 Thread Anthony
I'm coming at things backwards (as usual) and just now looking at writing unit tests for a couple of apps I'm working on. The most recent forum discussion of unit testing in general seems to be about a year old and references an appliance in web2py_utils as the most complete solution to

[web2py] Template efficiency

2012-04-03 Thread Yarin
Massimo mentions herehttps://groups.google.com/d/msg/web2py/MaL-nJFcKDc/R-JZ5DQOIzkJthat one optimization tip is to remove remove un-necessary {{...}} from the layout. Can someone speak to this- is there a real performance hit to doing ul li{{=var1}}/li li{{=var2}}/li li{{=var3}}/li /ul

[web2py] Re: current state of unit testing tools?

2012-04-03 Thread monotasker
No, I hadn't seen that. Thanks Anthony. Ian On Tuesday, April 3, 2012 4:56:54 PM UTC-4, Anthony wrote: I'm coming at things backwards (as usual) and just now looking at writing unit tests for a couple of apps I'm working on. The most recent forum discussion of unit testing in general seems

Re: [web2py] Re: data source configuration

2012-04-03 Thread Alex
thanks for the cache info. I think that's the way to go for me. I'll create a function to read the connection properties and add the cache decorator for the function. It is still just a workaround but at least it should not have any performance penalties. I'm still wondering why such an

[web2py] DataTables Help needed

2012-04-03 Thread greenpoise
hi there. I found this: DataTables Filter Selecthttp://datatables.net/release-datatables/examples/api/multi_filter_select.html I want to add it to my web2py application. If I add the code to a static .js file and call it from my view, it does not work. However, if I embed the code within the

Re: [web2py] Re: compiling web2py app

2012-04-03 Thread pbreit
It should work. I've never compiled an app and always just copy files to the server. Is your server able to run any other Web2py applications? What kind of server? Web server?

[web2py] Re: Tree view, Rendering

2012-04-03 Thread Simon Ashley
Have done so, but its more the plumbing of the JSON output that was wanting to get right, rather than inserting the result of a query in secondary table that would be dropped each time. Then there is the issue of lazy loading for more extensive datasets. Was hoping for a more canned solution.

[web2py] Re: DataTables Help needed

2012-04-03 Thread Anthony
DataTables Filter Selecthttp://datatables.net/release-datatables/examples/api/multi_filter_select.html I want to add it to my web2py application. If I add the code to a static .js file and call it from my view, it does not work. However, if I embed the code within the layout, it

Re: [web2py] Re: data source configuration

2012-04-03 Thread Anthony
thanks for the cache info. I think that's the way to go for me. I'll create a function to read the connection properties and add the cache decorator for the function. It is still just a workaround but at least it should not have any performance penalties. I'm still wondering why such an

[web2py] Re: Template efficiency

2012-04-03 Thread Massimo Di Pierro
I do not know for sure in this case. There is an overhead in serializing the UL/LI. Would be nice to have some benchmarks of both. On Tuesday, 3 April 2012 16:56:04 UTC-5, Yarin wrote: Massimo mentions herehttps://groups.google.com/d/msg/web2py/MaL-nJFcKDc/R-JZ5DQOIzkJthat one optimization

[web2py] Re: License Question

2012-04-03 Thread encompass
I think it is fun when we can say things like that. :) BR, J On Tuesday, April 3, 2012 9:46:59 PM UTC+3, Anthony wrote: Quick question: When do I need to have powered by web2py on the bottom of my page? Never. This is not a requirement of the web2py license. If you'd like to put it

[web2py] Re: Template efficiency

2012-04-03 Thread Anthony
I do not know for sure in this case. There is an overhead in serializing the UL/LI. Would be nice to have some benchmarks of both. In a stripped app with no models, no layout (just the list itself in the view), and session turned off: *For 3 items:* li: 5.9 ms/req UL/LI: 5.9 ms/req

[web2py] web2py online book

2012-04-03 Thread Ronghui Yu
A Python script git://github.com/stoneyrh/xscripts.git for retrieving web2py online book into a VIM help file. It will great help for searching via VIM capability. Hope you like it. Any feedback will be appreciated. -- === Regards Ronghui Yu

[web2py] My website is running lil slow

2012-04-03 Thread Kenny Chung
I have some python fetching rows and calculating distances on views. Do u guys think that it delays loading time? Thank you.

Re: [web2py] Data Tables versus SQLFORM.grid

2012-04-03 Thread Annet
Johann and Anthony, Thanks for your replies. They got me started, converting my tables from Data Tables to web2py's grid. Kind regards, Annet.

[web2py] LinkedIn Integration - my step by step tutorial

2012-04-03 Thread Udi Milo
It took a while to figure out, but this is my version on how to use linkedIn in web2py, comments are much appreciated. (its very detailed and intended for people that are just starting out like me) Enjoy! first thing, go to linkedIn.com and get your key and secret. after getting it: *1. add

[web2py] Re: represent in form

2012-04-03 Thread Annet
Hi Anthony, In db.py I defined these tables: db.define_table('Organization', Field('nodeID',db.Node,default='',notnull=True,ondelete='CASCADE',writable=False,readable=False), Field('name',length=128,default='',notnull=True), ..., migrate=False) db.define_table('Address',