[web2py] Re: Tree view, Rendering

2012-04-02 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

Re: [web2py] Improving scaffolding application

2012-04-02 Thread Bruno Rocha
This is talking about your custom application, not the admin. Go to the "create new simple application" form on admin interface (or do it by command line using $ python web2py.py -S mynewapp -M) inside your app you have to create the files needed. web2py/applications/*mynewapp*/models/0.py On

[web2py] Improving scaffolding application

2012-04-02 Thread Hironori Kawano
Hi, actually, I started reading *web2py Application Development Cookbook* * * It talks about improving default scaffolding application by writing 0.py file. My question is, where do I touch to change scaffolding application? Am I to create 0.py in models in newly created application or is it talk

Re: [web2py] Re: LDAP Query for more details

2012-04-02 Thread Shiv
Thanks a lot ... let me try this and get back to you. On Tue, Apr 3, 2012 at 1:03 AM, Derek wrote: > And this one specifically for Active Directory... > > http://www.web2pyslices.com/slice/show/1484/ldap-with-groups-yes-another-recipe > > > > On Monday, April 2, 2012 9:39:06 AM UTC-7, Shiv wrote

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-02 Thread pbreit
Yes, I suspect you need to "chown -R www-data:www-data web2py" your web2py directory. Also, if you're just doing development on your mac, you can skip all that and just run web2py directly: $ python web2py.py -a "" -i 127.0.0.1 -p 8001'

[web2py] Tree view, Rendering

2012-04-02 Thread Simon Ashley
Pretty new to this and stumbling a little. We need to generate a Treeview structure with the bottom node ending with some links to other pages (graphs etc) Have a 7 level deep structure (each level in a different table) with each level have a table format simple to the following: db.define_t

[web2py] Re: FORM SELECT

2012-04-02 Thread Cliff
May I make a suggestion? Your model will be simpler like this ... db.define_table('province', SQLField('name', 'string', length=50, required=True, default=None)) db.define_table('cities', SQLField('name', 'string', length=50, required=True), SQLField('id_provinc

[web2py] Re: FORM SELECT

2012-04-02 Thread Anthony
See http://stackoverflow.com/questions/8146260/best-practice-for-populating-dropdown-based-on-other-dropdown-selection-in-web2p/8152910#8152910. Also, SQLField() has been deprecated in favor of Field(). Anthony On Monday, April 2, 2012 2:38:51 PM UTC-4, visuallinux wrote: > > Dear All. > > I h

[web2py] Replacing uploaded file with new file - anybody got a better way?

2012-04-02 Thread Cliff
I'm thinking something like this: # Model ### db.define_table('things', Field('Name',), Field('document', upload, requires=IS_UPLOAD_FILENAME(extension='odt', lastdot=True)), ) #Controller ## def edit(): record

Re: [web2py] Re: data source configuration

2012-04-02 Thread Derek
@cache('key', 5000, cache.ram) that's how you cache it... On Monday, April 2, 2012 1:53:15 AM UTC-7, Carlos Correia wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Em 31-03-2012 07:17, Alex escreveu: > > ok, I think now I understand how the request_tenant works. So there > w

Re: [web2py] Returning JSON data to a GWT client app

2012-04-02 Thread Michele Comitini
Just to clarify things : JSONRPC!=JSON jsonrpc is a json specialization used as protocol to call remote procedures. web2py can be used to publish *jsonrpc* services using @service.jsonrpc mic Il giorno 02/apr/2012 16:33, "Carl Roach" ha scritto: > yes... I've been using @service.json and my P

[web2py] Re: LDAP Query for more details

2012-04-02 Thread Derek
And this one specifically for Active Directory... http://www.web2pyslices.com/slice/show/1484/ldap-with-groups-yes-another-recipe On Monday, April 2, 2012 9:39:06 AM UTC-7, Shiv wrote: > > Hi Team > > I am doing ldap authentication in my application. > Now, i want to get more information from t

[web2py] FORM SELECT

2012-04-02 Thread FERNANDO VILLARROEL
Dear All. I have the followings on models: db.define_table('province', SQLField('name', 'string', length=50, required=True, default=None)) db.define_table('cities', SQLField('name', 'string', length=50, required=True), SQLField('id_province',db.province, require

[web2py] Re: LDAP Query for more details

2012-04-02 Thread szimszon
http://www.web2pyslices.com/slice/show/1476/ldap-auth-with-allowed-groups-and-manage-groups You should get trunk version. 2012. április 2., hétfő 18:39:06 UTC+2 időpontban Shiv a következőt írta: > > Hi Team > > I am doing ldap authentication in my application. > Now, i want to get more informati

Re: [web2py] Deployment web2py Snow Leopard Server error

2012-04-02 Thread Ovidio Marinho
Check the permission folder ex. Grpup and owner = www-data Em segunda-feira, 2 de abril de 2012, Mobility escreveu: > I am new to Web2py. I tried to deploy it on my Snow Leopard Server running Mac OS X Server 10.6.8. I have already installed on the server the wsgi module which I use with a Django

[web2py] Deployment web2py Snow Leopard Server error

2012-04-02 Thread Mobility
I am new to Web2py. I tried to deploy it on my Snow Leopard Server running Mac OS X Server 10.6.8. I have already installed on the server the wsgi module which I use with a Django app. I installed web2py on the server following the guidelines on the deployment chapter of the Web2py Book (4th ed

[web2py] LDAP Query for more details

2012-04-02 Thread Shiv
Hi Team I am doing ldap authentication in my application. Now, i want to get more information from the LDAP like First name, last name, contact info. Can any one guide me to achieve the same? Thanks & Regards Shiv

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Sushant Taneja
Thanks. Got that reply sometime after I posted. I have changed my code. I have now created an upload image component with a form and am using the LOAD() feature with ajax=False to get it working. Thanks again for the reply. Helped a lot ! :) On Monday, April 2, 2012 7:20:24 PM UTC+5:30, Anthony

[web2py] Re: SpatiaLite support now in trunk

2012-04-02 Thread DenesL
Each OS has to load a different extension: Windows: libspatialite-2.dll Linux: libspatialite.so Mac OS X: libspatialite.dylib This, I think, can be simplified by just having: self.execute(r'SELECT load_extension("libspatialite");')

Re: [web2py] CkEditor Edit in Place

2012-04-02 Thread Ovidio Marinho
http://www.web2pyslices.com/slice/show/1345/using-ckeditor-for-text-fields Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83

Re: [web2py] Re: How to Represent a Foreign Key Using Foreign Keys in Primary Table

2012-04-02 Thread Patrick Ryan
No dice. I think I'm going to take your original advice and build a reference table, though. Thanks again for your help. On Fri, Mar 30, 2012 at 9:13 PM, Derek wrote: > I see what you mean. In that case, you don't want to reference the other > table, since you don't have a many to many table. >

Re: [web2py] Returning JSON data to a GWT client app

2012-04-02 Thread Carl Roach
yes... I've been using @service.json and my Pyjamas app can call such decorated and retrieve json-formatted data. all I need to do is "return {'tag1', data1', 'tag2', data2} I now want to know how I can get a GWT app to call the same function. Anyone using GWT with Web2py? On 2 April 2012 11:34,

Re: [web2py] Re: Routes.py parameter, rewrite rules and redirect

2012-04-02 Thread Joseph Piron
Indeed, makes sense. Thanks for the confirmation :) On 02 Apr 2012, at 16:02, Jonathan Lundell wrote: > On Apr 2, 2012, at 3:27 AM, Joseph.Piron wrote: >> Ah, and another simple question, maybe dull.. :) >> >> Does the domains option have any use when web2py's app is served from a >> apache or

Re: [web2py] Re: 10.24$ reward for a recipe logging a user

2012-04-02 Thread selecta
I am not able to find out how to email you in private o_O On Tuesday, March 27, 2012 12:06:43 AM UTC+2, bussiere adrien wrote: > > It work > > Thanks > Just mail me in private where to give > Bussiere > > Le lundi 26 mars 2012 20:23:06 UTC+2, selecta a écrit : >> >> if it works please donate

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

2012-04-02 Thread bussiere adrien
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 ? Regards and thanks Bussiere Le lundi 2 avril 2012 10:00:23 UTC+2, Manuele a écrit :

Re: [web2py] Re: Routes.py parameter, rewrite rules and redirect

2012-04-02 Thread Jonathan Lundell
On Apr 2, 2012, at 3:27 AM, Joseph.Piron wrote: > Ah, and another simple question, maybe dull.. :) > > Does the domains option have any use when web2py's app is served from a > apache or nginx frontend by wsgi ? Maybe. There are two reasons (that I can think of) why it might not. One is whether

Re: [web2py] Routes.py parameter, rewrite rules and redirect

2012-04-02 Thread Jonathan Lundell
On Apr 2, 2012, at 2:57 AM, Joseph.Piron wrote: > For one of my applications, I use web2py as a rest backend for a extjs > application. So, in order to redirect to this app, I have > def index(): > """ > example action using the internationalization operator T and flash > rendered by

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Anthony
> > But as I stated above, the problem is the element which contains the > _formname and _formkey is not getting generated on the page for the image > upload form and I think that it might be creating the problem. > > What can be the reason for it ? > Did you see my other reply? It sounds like

[web2py] Re: Login form, can't login..

2012-04-02 Thread Joseph.Piron
Ok, it seems it is Chrome related.. :| I tried with Firefox and Safari and they hit the server only once. Could someone please confirm he has the same problem with Chrome (build 18.0.8025.142) ?? Le lundi 2 avril 2012 15:31:23 UTC+2, Joseph.Piron a écrit : > > Hi all, > > I got another probl

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Sushant Taneja
Thanks Anthony. But as I stated above, the problem is the element which contains the _formname and _formkey is not getting generated on the page for the image upload form and I think that it might be creating the problem. What can be the reason for it ? On Monday, April 2, 2012 6:29:41 PM U

Re: [web2py] Re: Deployment sqlite question

2012-04-02 Thread Ruben Orduz
Thanks for link, I'll check it out. And yeah it's totally risky, but it's more to prove a point that automated deployment works with a small app rather than full-sized deployment. On Mon, Apr 2, 2012 at 1:02 AM, pbreit wrote: > That seems risky to automatically pull in changes but I guess it cou

[web2py] Login form, can't login..

2012-04-02 Thread Joseph.Piron
Hi all, I got another problem (today's not my day it seems.. :'( ) I am trying to login through ldap but can't and nailed down another problem: On a simple login form url "default/user/login?_next=/app/default/index" I get the classic login html form but can't succeed to log in. Indeed, I traced

[web2py] Re: Routes.py parameter, rewrite rules and redirect

2012-04-02 Thread Anthony
> > However, if your web server (e.g., Apache) is set up to serve static files > directly, you don't want to re-write your outgoing static urls unless your > server knows how to map them as incoming urls. FYI, I think that's why map_static defaults to False -- the assumption is that web2py wi

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Anthony
> > I also checked using chrome developer tools that the which contains > the _formkey and _formname is not getting generated (missing from HTML). > May be that is the reason the form is not working. > > What may be the reason for this ? and what is a feasible solution ? > Sounds like you're n

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Anthony
> > I tried with form.validate() and also with form.process().accepted. Can > you provide some sample code on how do I achieve the above ? > I am already providing the name of the form while declaring it. How is it > different from web2py generated _formname ? > Your original code simply set th

Re: [web2py] Re: Routes.py parameter, rewrite rules and redirect

2012-04-02 Thread Joseph Piron
Nice! I am gonna try that ! On 02 Apr 2012, at 14:50, Anthony wrote: > If you want the default app removed from static URLs, you have to set > map_static=True in your router (see > http://code.google.com/p/web2py/source/browse/router.example.py#64). However, > if your web server (e.g., Apache

[web2py] Re: Routes.py parameter, rewrite rules and redirect

2012-04-02 Thread Anthony
If you want the default app removed from static URLs, you have to set map_static=True in your router (see http://code.google.com/p/web2py/source/browse/router.example.py#64). However, if your web server (e.g., Apache) is set up to serve static files directly, you don't want to re-write your out

[web2py] Re: web2py recommended web hosting

2012-04-02 Thread Yarin
As of March 2012 GAE supports neither relational DBs nor SSL on custom domains- making it a nonstarter for any production app I can think of. On Monday, March 7, 2011 6:46:01 PM UTC-5, Richard Penman wrote: > > Unless you need special features I recommend Google App Engine because > there is no

[web2py] Older facebook clone application issue

2012-04-02 Thread rif
The facebook clone application contains some code that is not supported on appengine: tokens = form.vars.name.split() query = reduce(lambda a,b:a&b, [User.first_name.contains(k)|User.last_name.contains(k) for k in tokens]) people = db(query).select(orderby=alphabetical) Is there any recomm

Re: [web2py] Re: grid without delete botton

2012-04-02 Thread Manuele Pesenti
Il 02/04/2012 12:41, Martín Mulone ha scritto: use the parameter deletable=False SQLFORM.grid(...deletable=False ... ) ok I solved at the moment using deletable = 'edit' in request.args SQLFORM.grid(...deletable=deletable ... ) thanks Manuele

Re: [web2py] Re: data source configuration

2012-04-02 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Em 31-03-2012 07:17, Alex escreveu: > ok, I think now I understand how the request_tenant works. So there would be > just one database for everything but every table is filtered by the field? If > that is the case that's really not what I want. > > I

Re: [web2py] Returning JSON data to a GWT client app

2012-04-02 Thread Michele Comitini
Carl, Try the code below for plain json. For pyjamas you can use jsonrpc it works well with web2py. See the web2py book to learn how to use the @service annotation. def call(): session.forget() return service() @service.json def stockPrices(q): sym = q rows = db(db.stock_price).selec

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Sushant Taneja
I also checked using chrome developer tools that the which contains the _formkey and _formname is not getting generated (missing from HTML). May be that is the reason the form is not working. What may be the reason for this ? and what is a feasible solution ? On Monday, April 2, 2012 10:55:51

Re: [web2py] Re: grid without delete botton

2012-04-02 Thread Manuele Pesenti
Il 02/04/2012 12:41, Martín Mulone ha scritto: use the parameter deletable=False SQLFORM.grid(...deletable=False ... ) but in this way I cannot delete record at all from the grid, neither from the update form that it generates. The fact is that I need to setup some ondelete function for every r

Re: [web2py] Returning JSON data to a GWT client app

2012-04-02 Thread Carl Roach
thanks Michele alas that change returns "invalid view (default/stockPrices.html)" presumably because there is no view or no view with "prices" defined. I'm looking for something that allows my existing Pyjamas app and new GWT app to call the same functions. That gives me a good way to test the ne

Re: [web2py] Re: grid without delete botton

2012-04-02 Thread Martín Mulone
use the parameter deletable=False SQLFORM.grid(...deletable=False ... ) 2012/4/2 Manuele Pesenti > excuse me I forgot to complete the object... > > Il 02/04/2012 10:46, Manuele Pesenti ha scritto: > >> Hi, >> is there an easy way to use grid and smartgrid without the delete botton? >> I mean I

Re: [web2py] Returning JSON data to a GWT client app

2012-04-02 Thread Michele Comitini
Carl, You may find the @service.json annotation useful. Try the following: return dict(prices=prices) Il 02 aprile 2012 11:08, Carl ha scritto: > I'm looking at the example StockWatcher.java from GWT modified to use JSON > and call a Web2py server app. > > In the client app I'm > using: http:/

[web2py] Re: Routes.py parameter, rewrite rules and redirect

2012-04-02 Thread Joseph.Piron
Ah, and another simple question, maybe dull.. :) Does the domains option have any use when web2py's app is served from a apache or nginx frontend by wsgi ? Le lundi 2 avril 2012 11:57:37 UTC+2, Joseph.Piron a écrit : > > Hi all, > > For one of my applications, I use web2py as a rest backend for

[web2py] Routes.py parameter, rewrite rules and redirect

2012-04-02 Thread Joseph.Piron
Hi all, For one of my applications, I use web2py as a rest backend for a extjs application. So, in order to redirect to this app, I have def index(): """ example action using the internationalization operator T and flash rendered by views/default/index.html or views/generic.html

Re: [web2py] grid without

2012-04-02 Thread Manuele Pesenti
Il 02/04/2012 11:06, Johann Spies ha scritto: Use 'deletable=False' in the argurments for the grid. Documented at http://www.web2py.com/books/default/chapter/29/7#SQLFORM.grid-and-SQLFORM.smartgrid-%28experimental%29 Regards Johann Hi Johann, thanks for your replay but that's not what I'm l

[web2py] Book Typo

2012-04-02 Thread Johann Spies
In this list in http://www.web2py.com/books/default/chapter/29/7?search=%25b %Y '1963' %y '63' %d '28' %m '08' %b 'Aug' %b 'August' %H '14' %I '02' %p 'PM' %M '30' %S '59' the second %b should be %B Regards Johann -- Because experiencing your loyal love is better than life itself,

[web2py] Returning JSON data to a GWT client app

2012-04-02 Thread Carl
I'm looking at the example StockWatcher.java from GWT modified to use JSON and call a Web2py server app. In the client app I'm using: http://127.0.0.1:8000/init/default/stockPrices.json?q=ABC note the ".json" extension. In my default.py in Web2py I have: def stockPrices(): sym = request.var

Re: [web2py] grid without

2012-04-02 Thread Johann Spies
On 2 April 2012 10:46, Manuele Pesenti wrote: > Hi, > is there an easy way to use grid and smartgrid without the delete botton? Use 'deletable=False' in the argurments for the grid. Documented at http://www.web2py.com/books/default/chapter/29/7#SQLFORM.grid-and-SQLFORM.smartgrid-%28experimenta

[web2py] Re: grid without delete botton

2012-04-02 Thread Manuele Pesenti
excuse me I forgot to complete the object... Il 02/04/2012 10:46, Manuele Pesenti ha scritto: Hi, is there an easy way to use grid and smartgrid without the delete botton? I mean I want to only use the deleting option from the update form not the botton in the table because in this case no cal

[web2py] grid without

2012-04-02 Thread Manuele Pesenti
Hi, is there an easy way to use grid and smartgrid without the delete botton? I mean I want to only use the deleting option from the update form not the botton in the table because in this case no callback function are performed ( http://code.google.com/p/web2py/issues/detail?id=651) I've ha

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

2012-04-02 Thread Manuele Pesenti
Il 01/04/2012 23:23, bussiere adrien ha scritto: ok i see the example : >>> db.define_table('tag',Field('name'),format='%(name)s') >>> db.define_table('product', Field('name'), Field('tags','list:reference tag')) >>> a=db.tag.insert(name='red') >>> b=db.tag.insert(name='gree

Re: [web2py] is_in_db two tables

2012-04-02 Thread Manuele Pesenti
Il 01/04/2012 23:01, CtrlSoft ha scritto: it's a good idea, but i'm using sqlform.grid in app admin and this will create confusion in rows ..., i need to hide rows that are in sidemenu or in top menu. something like this? def mycontroller(): menu_type = request.vars.menu_type or redirect(