[web2py] Re: Domains and Web2Py

2011-05-15 Thread Oscar
Thank you very much. Oscar. On 15 mayo, 21:10, Anthony wrote: > Seehttp://web2py.com/book/default/chapter/04#Parameter-Based-System, in > particular, this example: > > routers = dict( >   BASE  = dict( >       domains = { >           'domain1.com' : 'app1', >           'domain2.com' : 'app2', >

Re: [web2py] Re: Weird Error in modules files...

2011-05-15 Thread Jason (spot) Brower
Aww, thanks. And here I thought I found a bug. It was just a feature. :P On Mon, May 16, 2011 at 6:02 AM, ron_m wrote: > If the second parameter on local_import is True it will reload each time > the statement is executed. Otherwise it retains the first local_import until > server restart. >

Re: [web2py] Re: Weird Error in modules files...

2011-05-15 Thread ron_m
If the second parameter on local_import is True it will reload each time the statement is executed. Otherwise it retains the first local_import until server restart.

Re: [web2py] Re: show multiple tables in 1 page

2011-05-15 Thread pbreit
Hard to say the best way to do it. This might be one way (not tested). === controller === def index(): pages = db(db.page.id>0).select(orderby = db.page.title) comments = db(db.comment.id>0).select() return dict(pages=pages, comments=comments) === view === {{for page in page:}} {

Re: [web2py] Re: web2py japan - congratulations

2011-05-15 Thread Stifan Kristi
a, great to hear that hosoda kenji san. i'll wait and want to try it. On Mon, May 16, 2011 at 9:23 AM, kenji4569 wrote: > > why u didn't also put japanese translation language on web2py default? > To do so, we have to arrange the translation in markmin format, and > will do it when the translati

[web2py] Re: web2py japan - congratulations

2011-05-15 Thread kenji4569
> why u didn't also put japanese translation language on web2py default? To do so, we have to arrange the translation in markmin format, and will do it when the translation finished. On 5月16日, 午前10:43, Stifan Kristi wrote: > hi, massimo, > > why u didn't also put japanese translation language on

Re: [web2py] Re: web2py japan - congratulations

2011-05-15 Thread Stifan Kristi
hi, massimo, why u didn't also put japanese translation language on web2py default? it's just a suggestion. thanks On Mon, May 16, 2011 at 8:04 AM, kenji4569 wrote: > Hi Massimo, > > the site is recently developed by a member of web2py-japan, Nakagaki- > san. The book translation and any infor

[web2py] Re: Domains and Web2Py

2011-05-15 Thread Anthony
See http://web2py.com/book/default/chapter/04#Parameter-Based-System, in particular, this example: routers = dict( BASE = dict( domains = { 'domain1.com' : 'app1', 'domain2.com' : 'app2', } ), ) Anthony On Sunday, May 15, 2011 8:23:46 PM UTC-4, Osca

Re: [web2py] How to apply a layout?

2011-05-15 Thread Bruno Rocha
Layouts are plugins, un your app click in plugin and choose the file to upload. Em 15/05/2011 21:31, "Vinicius Assef" escreveu: > Guys, I'm certains this is very basic stuff, but I couldn't find an > explanation to apply a layout from www.web2py.com/layouts to my app. > > I downloaded a file with

[web2py] Re: web2py japan - congratulations

2011-05-15 Thread kenji4569
Hi Massimo, the site is recently developed by a member of web2py-japan, Nakagaki- san. The book translation and any information of web2py are written and published here, by members of web2py-japan. The translation is still in progress, and will be feedbacked to you when finished. Thanks for your m

[web2py] Re: Multiple tables: update/insert/delete: in one form

2011-05-15 Thread villas
Hi Vineet I'm sorry you didn't get a satisfactory answer, but I imagine there are group members like myself who would love to contribute but don't quite understand. Let's see if I got this right... You have a tricky form which might affect several different tables depending on which fields are c

[web2py] How to apply a layout?

2011-05-15 Thread Vinicius Assef
Guys, I'm certains this is very basic stuff, but I couldn't find an explanation to apply a layout from www.web2py.com/layouts to my app. I downloaded a file with w2p extension from there and I don't know how to use it. Please, send me a link because the book chapter about it doesn't touch about u

[web2py] Domains and Web2Py

2011-05-15 Thread Oscar
Hi, I want to host a single Web2Py installation with few appliances or apps installed on it, Can I redirecto with Web2Py every domain pointed to my host to the related appliance? I mean at Web2Py level, not to ngix or Apache level. Regards, Oscar.

Re: [web2py] Re: pagination previous and next on the controller

2011-05-15 Thread Stifan Kristi
thank you so much for your hints and pointers, pbreit. i've already read the url, but still don't understand, what is the intent of the url. but i get it what you've said, again thank you very much. On Mon, May 16, 2011 at 12:44 AM, pbreit wrote: > You could check out this approach: > http://pac

Re: [web2py] web2py syntax for vim

2011-05-15 Thread contatogilson...@gmail.com
Fork the project for add files: https://github.com/lvidarte/web2py-snippets _ *Gilson Filho* *Web Developer http://gilsondev.com* 2011/5/15 pancurster > Hi, > I was looking today for vim syntax for web2py templates but I didn't > find it. So I make m

Re: [web2py] Re: differntial of request.args[0] and request.args(0)

2011-05-15 Thread Stifan Kristi
a, i'm understand right now, thank you so much for your detail explaination all. On Mon, May 16, 2011 at 12:51 AM, pbreit wrote: > Just remember that the () method is unique to Web2py "strorage" objects and > cannot be used generally in Python. > > Same for request.vars (web2py) vs. request['va

Re: [web2py] web2py japan - congratulations

2011-05-15 Thread Stifan Kristi
great job, congratulations! On Mon, May 16, 2011 at 2:51 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Who did this? Congratulations! > > http://sites.google.com/site/web2pyjapan/book/01 > >

Re: [web2py] Re: show multiple tables in 1 page

2011-05-15 Thread Stifan Kristi
thank you so much for your hints and pointers denes & pbreit, pardon me, i just wan to show up all of the content of wiki page on index page and also the comments that related with it. is there a way to do this? i've already modified it into (learned from kenneth damian blog on appliances): def i

[web2py] web2py syntax for vim

2011-05-15 Thread pancurster
Hi, I was looking today for vim syntax for web2py templates but I didn't find it. So I make my own. If some one want this syntax files here u go: http://dl.dropbox.com/u/18809604/vim_web2py_syntax/htmlweb2py.vim http://dl.dropbox.com/u/18809604/vim_web2py_syntax/web2py.vim htmlweb2py.vim is main sy

[web2py] web2py japan - congratulations

2011-05-15 Thread Massimo Di Pierro
Who did this? Congratulations! http://sites.google.com/site/web2pyjapan/book/01

Re: [web2py] Re: differntial of request.args[0] and request.args(0)

2011-05-15 Thread Jason Brower
That is correct, except it really is python that Massimo has done here. It's a convenience method that he has created for this very issue as it happens a lot. On 05/15/2011 08:51 PM, pbreit wrote: Just remember that the () method is unique to Web2py "strorage" objects and cannot be used gener

Re: [web2py] Re: Class-based controllers and prefixes in wizard

2011-05-15 Thread Bruno Rocha
The functional case has 15 methods. In the first case there are 3 classes and 8 methods (more compact and readable). Why do I need to repeat some methods in the successors? Now, with new web2py in trunk you can create this logic under /modules (as normal Python modules) in your controllers you wi

[web2py] Re: make project_id identical with isReply

2011-05-15 Thread pbreit
Do you have a reply_comment view? It should at least have in it {{=form}}

Re: [web2py] Re: differntial of request.args[0] and request.args(0)

2011-05-15 Thread pbreit
Just remember that the () method is unique to Web2py "strorage" objects and cannot be used generally in Python. Same for request.vars (web2py) vs. request['vars'] (python). http://web2py.com/book/default/chapter/04#request Is that correct everyone?

Re: [web2py] Re: pagination previous and next on the controller

2011-05-15 Thread pbreit
You could check out this approach: http://packages.python.org/web2py_utils/paginate.html {{ }} *ONLY* work in views. The other thing you could consider if you want to put it in a controller, model or module is using HTML tag helpers like this: if page: previous = A('previous', _href=UR

[web2py] Re: show multiple tables in 1 page

2011-05-15 Thread pbreit
That's why you would not usually structure it like this. Your index page is going to show all of the pages but then the comments for just one page. And as Denes points out, if someone just goes to "/index", you're going to be missing a request.args(0). I don't really understand why you would set

[web2py] Two fields with autocomplete in a single form fail

2011-05-15 Thread nekrox
db.define_table('cities', Field('name', 'string'), Field('state', db.states) ) db.define_table('categories', Field('name', 'string') ) db.define_table('places', Field('name', 'string', required=True), Field('address1', 'string'), F

Re: [web2py] Re: Weird Error in modules files...

2011-05-15 Thread Jason Brower
After restarting the server it seems the issue was fixed. It could be that the modules are loaded and then assumed that they don't change so they are placed in memory for speed reasons or something like that. BR, Jason Brower On 05/15/2011 06:18 PM, DenesL wrote: It is hard to tell without th

[web2py] Re: show multiple tables in 1 page

2011-05-15 Thread DenesL
The error is due to the possibility of not finding a record in db.page using request.args(0) as id. Your program has to be able to deal with this eventuality. On May 15, 4:34 am, 黄祥 wrote: > hi, > > is it possible to show multiple tables in 1 page? > > e.g. like onhttp://web2py.com/book/default

[web2py] Re: Weird Error in modules files...

2011-05-15 Thread DenesL
It is hard to tell without the code but this looks suspicious size_variance-user._extra['COUNT(users_tags.id)'])) why is COUNT(...) in quotes? On May 15, 7:12 am, Jason Brower wrote: > I am using latest, not trunk... > I was testing some of my code and I got some index errors.  That's fine

[web2py] Re: Multiple tables: update/insert/delete: in one form

2011-05-15 Thread Vineet
Simon, That is a good idea. In fact, almost the same approach is being followed in VFP cursor adaptor (the difference being that, data from MySQL tables is reproduced in same table structures, i.e cursors). Here, by virtual table, do you mean to say that we should reproduce the data into dictionar

[web2py] Re: Class-based controllers and prefixes in wizard

2011-05-15 Thread Dmitriy
Thanks all for the prompt answers! Massimo, I think that the flag in Wizard can solve the prefixes issue. Regarding the class-based controllers. pbreit, the components and the load function can help me in the composition, but can't help in the inheritance. Thanks for a good example, Bruno! I ag

[web2py] make project_id identical with isReply

2011-05-15 Thread Andrew Evans
Hello I have a commenting system I am working on and I am having a problem with passing the arguments so they match up. I am trying to make comments.project_id match up with the isReply field when I add a Reply I am passing args=row.project_id as an argument to the reply_comment form My comment s

[web2py] Re: Multiple tables: update/insert/delete: in one form

2011-05-15 Thread Simon Ashley
Since no one has replied for a couple of days, I'll toss my 2 cents in. Don't how much value this could be, as we just evaluating web2py and python but in another environment we could have written data in the normalised records to a temporary record in a denormalised, virtual table, update and save

Re: [web2py] Re: default usage

2011-05-15 Thread Stifan Kristi
a, i got it, thank you so much for your detail explaination and example, villas. On Sun, May 15, 2011 at 5:27 PM, villas wrote: > It is simply how that record id will be displayed when used in a > foreign key. > > e.g. > > table colors: > id: 1, name: red, > id: 2, name: yellow, > > table

[web2py] has anyone used fathom (or something alike) with web2py DAL ?

2011-05-15 Thread Stef Mientki
hello, has anyone used pathom http://code.google.com/p/fathom/downloads/list especially the GraphViz representation looks usefull to me. Are there other packages that can show a representatie like this ? thanks, Stef

[web2py] Re: profiler: ImportError: No module named pstats?

2011-05-15 Thread Philip
Solved - default debian/ubuntu install of python no longer includes the profiler because of license issues. The package python-profiler needs to be installed. Sorry for wasting your time. Thanks, Philip On May 14, 4:56 pm, Massimo Di Pierro wrote: > I am running it with 2.5 > > On May 14, 3:11 p

[web2py] Weird Error in modules files...

2011-05-15 Thread Jason Brower
I am using latest, not trunk... I was testing some of my code and I got some index errors. That's fine so I go into the file and make some changes. Then it says the same error but this time a different line. One that doesn't even use indexs. So I put a comment on the line and this is what I

[web2py] Re: default usage

2011-05-15 Thread villas
It is simply how that record id will be displayed when used in a foreign key. e.g. table colors: id: 1, name: red, id: 2, name: yellow, table cars: id: 1, descr: sport, color_id: 1 When you create a form for 'cars', how would you like the color_id field to appear? a) a drop-down

[web2py] show multiple tables in 1 page

2011-05-15 Thread 黄祥
hi, is it possible to show multiple tables in 1 page? e.g. like on http://web2py.com/book/default/chapter/03#A-Wiki but i want to add the comment on the index function like : def index(): pages = db().select(db.page.id, db.page.title, orderby = db.page.title) this_page = db.page(request

Re: [web2py] Re: pagination previous and next on the controller

2011-05-15 Thread Stifan Kristi
i've already tried to moved curly brackets {{ }} in the controllers and still gettin an error, my intention is because all of my views is using pagination and i want to simplified it to just put on the centralize db functions. is there any ways to do this? thank you so much On Sun, May 15, 2011 at

Re: [web2py] Re: differntial of request.args[0] and request.args(0)

2011-05-15 Thread Stifan Kristi
i'm understand right now, thank you so much for your detail explaination ron On Sun, May 15, 2011 at 2:08 PM, ron_m wrote: > In the core chapter of the book I found this: > > In the above example, both request.args[i] and request.args(i) can be used > to retrieve the i-th element of the request.

[web2py] Re: differntial of request.args[0] and request.args(0)

2011-05-15 Thread ron_m
In the core chapter of the book I found this: In the above example, both request.args[i] and request.args(i) can be used to retrieve the i-th element of the request.args, but while the former raises an exception if the list does not have such an index, the latter returns None in this case. I w