[web2py] Re: sqlform.grid and represent vs. format

2011-10-30 Thread szimszon
http://code.google.com/p/web2py/issues/detail?id=491 tnx.

[web2py] Cheaper hosting...

2011-10-30 Thread Magnitus
So far, I've been using this service for my personal apps at 1 node: http://www.vps.net/product/cloud-servers/ Recently, someone suggested this: http://fibervolt.com/vps.php At the lower specs range (and assuming you don't use even a 1/10 of the bandwidth vps provides), you have something that is

[web2py] Re: Found a bug: XMLRPC with basic authorization fails

2011-10-30 Thread szimszon
http://code.google.com/p/web2py/issues/detail?id=492

[web2py] Re: curl post with authentication

2011-10-30 Thread szimszon
http://code.google.com/p/web2py/issues/detail?id=492

[web2py] grid - hiding reconds found count

2011-10-30 Thread peter
I am hoping that the developers of SQLFORM.grid will add an option to hide the 'nn records found' message. In fact I do not think it should appear at all when there is no search in place. I have discovered a neat way of hiding this message Put in your layout.html (or more locally if you wish) .web

Re: [web2py] Cheaper hosting...

2011-10-30 Thread Marin Pranjić
If you need very cheap hosting, you can look here: http://www.lowendbox.com/ However, price does matter :) Uptime, customer support... These providers are good for testing, backup, or small unimportant sites. It's risky but if you pay monthly, not a big loss if something goes bad. If you need soli

[web2py] Re: Question to Bruno on grid and styles

2011-10-30 Thread peter
I am seeing the comments like a programmer sees comments, you comment out a bit of code when you want to temporarily disable it. I see that this is a different kind of comment to a comment where you want the generated html to contain comments. Having seen Massimo's video on floss I can see why the

[web2py] Re: Massimo Di Pierro talks about web2py on FLOSS Weekly

2011-10-30 Thread peter
I will think about making it open source in the future. The problem is a) It is my first python and web2py project, so the coding is not always as clean as an experienced python programmer would produce. Secondly a music download store is not close to a generic ecommerce store. When I have some mor

[web2py] WebFactions Applications

2011-10-30 Thread Web2Py Freak
Dear All , I am using WebFaction for hosting , i install the web2py app in a custom script , now do i have to install an app for every website or use just one app , and if using one app how can i point the domain to it ?? Best Regards , Hassan Alnator

[web2py] Re: adjusting default select() behavior

2011-10-30 Thread lucas
thanx massimo, i guess that does give the most optimum customization and control. thank you. lucas

[web2py] web2py App for sharing research results.

2011-10-30 Thread Richard
Does anybody have an web2py app for sharing research data? We are with a number of teams of students researching the same subject. To increase the statistical power we want to share research data so one can increase validity. A short functional design: . Users will be authenticated . This site wi

[web2py] How about auth.define_tables(..., format='...')?

2011-10-30 Thread Ray (a.k.a. Iceberg)
Hi Massimo, How about add a new parameter to auth.define_tables()? As below. def define_tables(..., format=''%(first_name)s %(last_name)s (% (id)s)"): ... db.define_table(..., format=format) ... The idea is to let user has a change to customize it. Currently we can override this v

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 30, 7:23 pm, Web2Py Freak wrote: > Dear All , > >  I am using WebFaction for hosting , i install the web2py app in a > custom script , now do i have to install an app for every website or > use just one app , and if using one app how can i point the domain to > it ?? > > Best Regards , > Ha

[web2py] Re: Persistent variables in web2py

2011-10-30 Thread evilaliv3
On 30 Ott, 00:39, Massimo Di Pierro wrote: > You must use cache.ram but this is not guaranteed to work. Excuse me Massimo, but, if i understand well this answer, there is no way to have also a persistent connection to the database or a global application variable in web2py? for every request the

[web2py] Re: How about auth.define_tables(..., format='...')?

2011-10-30 Thread Anthony
I think you'd need different format arguments for auth_user and auth_group, as they both have formats specified. Anthony On Sunday, October 30, 2011 9:48:04 AM UTC-4, Ray (a.k.a. Iceberg) wrote: > > Hi Massimo, > > How about add a new parameter to auth.define_tables()? As below. > > def defi

[web2py] Re: WebFactions Applications

2011-10-30 Thread Web2Py Freak
i understand it but i really dont know how to do it

[web2py] slideshow in plugin wiki

2011-10-30 Thread peter
The slideshow plugin in plugin wiki has a height and width parameter. Unless I am mistaken, these are not connected to anything and have no effect. Eventually I discovered the way to adjust the size of the slideshow is: In base.css put #slideshow1 { height: 500px; width: 580px; pa

[web2py] Re: grid - hiding reconds found count

2011-10-30 Thread Anthony
You can also get rid of it using server side DOM manipulation: del grid[0][2] # the web2py_counter div is the third component within the first div of the returned grid object Anthony On Sunday, October 30, 2011 6:00:12 AM UTC-4, peter wrote: > > I am hoping that the developers of SQLFORM.grid

[web2py] Re: WebFactions Applications

2011-10-30 Thread Web2Py Freak
My app name is 'Web2py' and in it i have two 'web2py app': 1- welcome 2-maestro now i have a domain and in the site app i selected web2py and there is nothing in the path so it takes the welcome app and now i have some other domain and i want it to start mastro web2py app .. i will select web2

Re: [web2py] Re: Persistent variables in web2py

2011-10-30 Thread Michele Comitini
You have persistent connections: just use the pool: it is documented in the book. If you find problems with speed use the profiler that comes with web2py and post here or open a ticket with the results and a model to reproduce those problems, they will be fixed. mic Il giorno 30/ott/2011 15:06, "e

[web2py] Re: Persistent variables in web2py

2011-10-30 Thread Massimo Di Pierro
this is not a web2py issue. This is an issue for all web applications. What if your application is replicated on two server behing a load balancer? The two servers cannot share objects. What if you use a web servers that forks (apache can) than different requests are executed by different processe

[web2py] Re: Question to Bruno on grid and styles

2011-10-30 Thread Anthony
On Sunday, October 30, 2011 6:45:02 AM UTC-4, peter wrote: > > I am seeing the comments like a programmer sees comments Yes, but as a programmer, you have to use the correct comment syntax for the language you are using. In the web2py template language, everything outside {{ }} is left as is in

[web2py] Re: How about auth.define_tables(..., format='...')?

2011-10-30 Thread Ray (a.k.a. Iceberg)
Nice comment Anthony. So I would like to mend my previous suggestion as: 1. the auth.define_tables(...) interface remains state quo 2. the auth.define_tables(...) implementation follows some new settings, e.g. db.define_table( ..., format = self.settings.table_user_name_format

[web2py] Re: How about auth.define_tables(..., format='...')?

2011-10-30 Thread Anthony
Probably just settings.table_user_format (i.e., the format for the user table), and maybe settings.table_group_format as well. Anthony On Sunday, October 30, 2011 10:48:25 AM UTC-4, Ray (a.k.a. Iceberg) wrote: > > Nice comment Anthony. So I would like to mend my previous suggestion > as: > > 1

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 30, 10:31 pm, Web2Py Freak wrote: > My app name is 'Web2py'  and in it i have two 'web2py app': > > 1- welcome > 2-maestro > > now i have a domain and in the site app i selected web2py and there is > nothing in the path so it takes the welcome app > > and now i have some other domain and i

[web2py] How to hide uuid field in crud create form

2011-10-30 Thread clarix
Hello, I added an uuid field to my tables to allow to merge dababases: Field('uuid',default=web2py_uuid(),writable = False), The problem I find is that the uuid field now shows in the crud.create forms. I tried to set the uuid readable property to False but in doing so the crud.create form not o

[web2py] Advantage to requires clause in controller vs model?

2011-10-30 Thread Tom Campbell
In the building a minimalist facebook clone video at around 7:30 I see this in default.py: def search() # make a form where to type a name form = SQLFORM.factory(Field('name',requires=IS_NOT_EMPTY())) Question about the requires. This no difference between putting

[web2py] Re: Persistent variables in web2py

2011-10-30 Thread Ray (a.k.a. Iceberg)
Hi Massimo, In the first post of this thread, Arturo said, "Is there a way in web2py to have varibles be persistent. For example when I instantiate a class I don't want to re-instantiate it every time a page is loaded." I guess what he concerns is performance. In other word, "web2py re- instanti

[web2py] Re: How to hide uuid field in crud create form

2011-10-30 Thread Anthony
Are you saying Field('uuid', default=web2py_uuid(), readable=False, writable=False) doesn't hide the field (it should)? Can you show more code? Also, note that default=web2py_uuid() will only set the default value once per request, so if your code happens to insert multiple records in the same

[web2py] Re: WebFactions Applications

2011-10-30 Thread Anthony
See here: http://web2py.com/book/default/chapter/04#Parameter-Based-System -- there's an example mapping domains to apps. On Sunday, October 30, 2011 10:31:13 AM UTC-4, Web2Py Freak wrote: > > My app name is 'Web2py' and in it i have two 'web2py app': > > 1- welcome > 2-maestro > > now i have

[web2py] Re: Persistent variables in web2py

2011-10-30 Thread Anthony
On Sunday, October 30, 2011 11:21:56 AM UTC-4, Ray (a.k.a. Iceberg) wrote: > > I guess what he concerns is performance. In other word, "web2py re- > instantiate all class, variables, app logics, etc. ... every time a > page is loaded. Only the stuff in models, and you can reduce that by using c

[web2py] Re: Advantage to requires clause in controller vs model?

2011-10-30 Thread Anthony
In general, you would define the validators with the model. However, the example below uses SQLFORM.factory, which is not based on an existing model (i.e., DB table definition). In other words, there is no define_table in a model file associated with that particular form creation. Anthony On S

[web2py] Using a decorator to choose which view to use

2011-10-30 Thread ~redShadow~
In many cases, I find out that I can use a single view to render results from multiple controllers, for example, I use this to render forms:: {{left_sidebar_enabled=right_sidebar_enabled=False}} {{extend 'layout.html'}} {{=title}} {{=form}} So I stored that view in ``default/form.

[web2py] Re: Using a decorator to choose which view to use

2011-10-30 Thread Anthony
You can use the new thread local 'current' object. In your module file: from gluon import * def use_custom_view(viewname): [snip] current.response.view = '%s.%s' % (viewname, current.request.extension) [snip] Also, note that local_import is no longer necessary -- now you can just

Re: [web2py] Re: Persistent variables in web2py

2011-10-30 Thread Michele Comitini
If you need distributed caching look at http://memcached.org/. mic Il giorno 30/ott/2011 16:30, "Anthony" ha scritto: > On Sunday, October 30, 2011 11:21:56 AM UTC-4, Ray (a.k.a. Iceberg) wrote: >> >> I guess what he concerns is performance. In other word, "web2py re- >> instantiate all class, v

[web2py] issueTracking

2011-10-30 Thread mart
Hi, I am shamelessly using Massimo's issueTracking and redoing it to replace my own "request" app (because obviously, massimo does it better than i could ;) ) If any body has played with it, i would have a few questions: 1) depending on the type of request, i would like the form to expose differ

[web2py] Re: issueTracking

2011-10-30 Thread mart
sorry... i hit 'return' to quickly ;) continuing: 2) I would like to do have a layout where fields are grouped by "category", maybe using something like a . I.e. * category 1 * bla: blabla * bla_1 : blabla * bla_2: blabla * category 2 * bla_3: blabla

Re: [web2py] Re: table.format cannot be set after define_table()?

2011-10-30 Thread Anthony
Now that I think about it, this has already been fixed in trunk. In trunk, you should be able to do: db.person._format='whatever' without having to first delete _format. That will work for any table attribute starting with an underscore, including the new _singular and _plural attributes (whic

[web2py] Powertable and DAL count

2011-10-30 Thread Wes Hall
I am trying to show a grouped count in a powertable. How do I reference the count's storage object? def event_list(): class Virtual(object): @virtualsettings(label='Count') def email_count(self): return ??? # What do I need to reference? report_id = in

Re: [web2py] Re: Using a decorator to choose which view to use

2011-10-30 Thread ~redShadow~
On Sun, 2011-10-30 at 08:54 -0700, Anthony wrote: > You can use the new thread local 'current' object. In your module > file: > > > from gluon import * > def use_custom_view(viewname): > [snip] > current.response.view = '%s.%s' % (viewname, > current.request.extension) > [snip] >

Re: [web2py] Re: Using a decorator to choose which view to use

2011-10-30 Thread Anthony
On Sunday, October 30, 2011 2:04:47 PM UTC-4, Samuele Santi wrote: > > BTW, is there any way to automatically watch module files for changes > using inotify and reload() them automatically upon change, at least > during development? > from gluon.custom_import import track_changes; track_changes(Tru

Re: [web2py] Re: WebFactions Applications

2011-10-30 Thread Vasile Ermicioi
a few steps that I use, I assume that you already installed web2py :) 0) set your domain at your registrar to point to webfaction dns servers 1) add your domain to webfaction domains 2) set your domain to be handled by your app (see webfaction's websites) 3 )create a routes.py (or rename routes_exa

[web2py] putting a condition in a form

2011-10-30 Thread mart
Hi, does anyone know if I can have some sort of condition in a form (but BEFORE the form is submitted)? For example, lets say I have 5 fields in a form where depending on what a user decides, we would expose 2 extra fields (or not). Anyway to do something like this? I am open to any suggestion :)

[web2py] Re: How to hide uuid field in crud create form

2011-10-30 Thread clarix
Hello Anthony, I think I found the problem. I had generated the table with the wizard and I had an id field in the table. I removed the id field and the uuid didn't show in the form anymore. I assume you either have an id field or a uuid field not both. Sorry for my clumsiness, I am a starter. Al

[web2py] Re: putting a condition in a form

2011-10-30 Thread apple
http://web2py.com/book/default/chapter/10#Conditional-Fields-in-Forms On Oct 30, 9:30 pm, mart wrote: > Hi, > > does anyone know if I can have some sort of condition in a form (but > BEFORE the form is submitted)? > > For example, lets say I have 5 fields in a form where depending on > what a use

[web2py] Communicating With C Application

2011-10-30 Thread Ialejandro
Hi! I'm building a simple (really) bank simulator for my class, I need to communicate my existing web2py app (just a CRUD) with a C application, what´s the best way to do that?? I mean, I need to have the same CRUD functionality in both sides, web (with web2py) and client (Ansi C, Unix/Linux/Mac),

[web2py] Re: Communicating With C Application

2011-10-30 Thread Ialejandro
I think the question is fuzzy... I know It can be done by writing SQL queries from C... but I want to use web2py as intermediary, so for example, to insert a new client the C app just send a query like this: 127.0.0.1:8080/bank/remoteCalls/insertClient?name= but what's the best way to retri

[web2py] Vim and syntax highlight.

2011-10-30 Thread f4eedu
Hi, Did anyone managed to set vim showing proper syntax highlight? It would be great if syntax could be displayed just like in the admin editor. Regards, F4eedu

[web2py] Re: putting a condition in a form

2011-10-30 Thread mart
cool! thanks :) On Oct 30, 5:39 pm, apple wrote: > http://web2py.com/book/default/chapter/10#Conditional-Fields-in-Forms > > On Oct 30, 9:30 pm, mart wrote: > > > > > > > > > Hi, > > > does anyone know if I can have some sort of condition in a form (but > > BEFORE the form is submitted)? > > > F

[web2py] Wordpress and web2py

2011-10-30 Thread Kenneth Lundström
Hi listmembers, a client of mine asked if Wordpress and web2py could be combined somehow. He has an Wordpress website and wants to continue using but has some specifiec needs that he would like to be solved with web2py. So when a user logins he does it in Wordpress, then he wants to look at

[web2py] Re: Wordpress and web2py

2011-10-30 Thread Anthony
I haven't tried it, but maybe you can set up single sign-on and make use of web2py's CAS client functionality: http://web2py.com/book/default/chapter/08#Central-Authentication-Service. On Sunday, October 30, 2011 7:44:45 PM UTC-4, Kenneth wrote: > > Hi listmembers, > > a client of mine asked if

[web2py] Re: Cheaper hosting...

2011-10-30 Thread pbreit
Looks like a decent deal. I'd wonder how well Web2py works in 128mb. I switched from 256mb to 512mb and got a lot better performance. But 256mb was enough to at least run.

[web2py] Re: How can I retain form data across a web2py_component() refresh?

2011-10-30 Thread TheSweetlink
How delightfully newbtastic of me. I don't have it working quite the way I want to yet but it does indeed appear that a global JS variable will do the trick. Thanks for the help Anthony. David On Oct 28, 6:52 pm, Anthony wrote: > On Friday, October 28, 2011 6:50:20 PM UTC-4, TheSweetlink wrote

[web2py] Re: putting a condition in a form

2011-10-30 Thread mart
hum... doesn't seem to be working for me... maybe because I am using these things: myTable=db.Table(None,'myTable', Field('name')) db.define_table('stuff',myTable)) oh well, I'll keep digging... Thanks, Mart :) On Oct 30, 7:10 pm, mart wrote: > cool! thanks :) > > On Oct 30, 5:39 pm, appl

Re: [web2py] Re: Wordpress and web2py

2011-10-30 Thread Ovidio Marinho
Well with respect to a statistic that still needs to be done by someone, but LucasDávila already prepared to import the XML wordpress, this in your github. https://github.com/lucasdavila/web2py-cms/tree/1.x Ovidio Marinho Falcao Neto Web Developer ovidio...@g

[web2py] Re: Persistent variables in web2py

2011-10-30 Thread Massimo Di Pierro
As Anthony suggests you can move code to modules and import modules. Module can have global level variables (that do not depend on the user or the request) that will be persistant within the process that imports the module. Database connections anyway, are handled by web2py in an efficient way alr

Re: [web2py] Re: Auth in MongoDB

2011-10-30 Thread ~redShadow~
On Fri, 2011-10-28 at 12:12 -0700, Francisco Costa wrote: > Hi Samuele, thanks for your answer. > Do you have any idea whats the status of the mongodb adapter > development? I know that Massimo was going to work on that once finished the new documentation, and I am doing some experiments too (alt

Re: [web2py] Cheaper hosting...

2011-10-30 Thread ~redShadow~
On Sun, 2011-10-30 at 02:29 -0700, Magnitus wrote: > So far, I've been using this service for my personal apps at 1 node: > http://www.vps.net/product/cloud-servers/ > > Recently, someone suggested this: http://fibervolt.com/vps.php > > At the lower specs range (and assuming you don't use even a

[web2py] Re: JSONDecodeError: No JSON object could be decoded

2011-10-30 Thread wwwgong
ok, do you know a javascript client example? Thanks, On Oct 30, 12:42 am, Jonathan Lundell wrote: > On Oct 29, 2011, at 9:36 PM, wwwgong wrote: > > > > > > > > > > > Hi, > > add 2 functinos in myapp/controller/default.py > > > @service.run > > def concat(a,b): > >    return a+b > > > @service.jso

Re: [web2py] Re: JSONDecodeError: No JSON object could be decoded

2011-10-30 Thread Jonathan Lundell
On Oct 30, 2011, at 9:00 PM, wwwgong wrote: > ok, do you know a javascript client example? Thanks, Not offhand, no. But there's JSON-RPC documentation on the web that explains the protocol pretty well. And there's a client in the web2py contrib directory. > > On Oct 30, 12:42 am, Jonathan Lund

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 31, 3:27 am, Vasile Ermicioi wrote: > a few steps that I use, I assume that you already installed web2py :) > 0) set your domain at your registrar to point to webfaction dns servers > 1) add your domain to webfaction domains > 2) set your domain to be handled by your app (see webfaction's

[web2py] should this work? {{=form[0][-1]}}

2011-10-30 Thread mart
Hi, in a view, should i be able to execute this submit button? {{=form[0] [-1]}} it does display the button, but doesn't submit.. Thanks, Mart :)