[web2py] field attributes outside field definition.

2012-08-29 Thread Annet
In my models I have the following table definition: db.define_table('node', Field('computedName',length=128), Field('computedSubClass',type='integer'), Field('createdOn',type='datetime',default=request.now,requires=IS_DATETIME(format='%Y-%m-%d

Re: [web2py] Re: How to call controller function upon onClick from html?

2012-08-29 Thread Amit
Anthony, I am facing one more problem, I have one text Field called Name where user can input the name , i need to pass the entered name to controller function but if I use like: Button type=button name =seeting_button onclick = 'window.location={{=URL('default', 'record_config',

[web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread lyn2py
Thank you Anthony and Richard, I have tried to use IS_IN_DB in the form of return IS_IN_DB(...) but it doesn't work. The reason why I am looking for this function is because I am trying to load the options or a second field, based on what is chosen in the first field. Both are SELECTs. Like

[web2py] Re: web2py 2.0 stats

2012-08-29 Thread lyn2py
Excited! On Wednesday, August 29, 2012 11:35:15 AM UTC+8, Massimo Di Pierro wrote: It is ready but we cannot stop tweaking it ... we replaced 16,000 lines of code and we added 41,000 new lines when compared with web2py 1.99.2 (minified js count as one line). We may release it tomorrow.

[web2py] FORM with a SELECT and a mapping

2012-08-29 Thread Daniel Gonzalez
Hi, I have the following map: countries = { 'DE': T('Germany'), 'ES': T('Spain'), 'IT': T('Italy'), 'US': T('United States') } Which I am using to create a form, with the following entry: TR(T(Country:),SELECT(*countries,

Re: [web2py] more benchmarks of web2py 2.0 in trunk

2012-08-29 Thread Johann Spies
For an average of tree runs with cacheable = False: time to access field obj 0.00740687052 time to select 1000 recods 0.24633059502 time to access field values 0.24633059502 With cachable = True: time to access field obj 0.00823338826 time to select 1000 recods 0.15172052383

Re: [web2py] Re: web2py 2.0 stats

2012-08-29 Thread Chibuzo Ottih
cool. On Wed, Aug 29, 2012 at 8:05 AM, lyn2py lyn...@gmail.com wrote: Excited! On Wednesday, August 29, 2012 11:35:15 AM UTC+8, Massimo Di Pierro wrote: It is ready but we cannot stop tweaking it ... we replaced 16,000 lines of code and we added 41,000 new lines when compared with

Re: [web2py] Re: Google group again

2012-08-29 Thread stefaan
I can see it too, but only when looking at the https://groups.google.com/forum/?fromgroups#!forum/web2py page while logged in using my gmail account. --

Re: [web2py] more benchmarks of web2py 2.0 in trunk

2012-08-29 Thread Michele Comitini
Massimo, We should also look at memory footprint. IMHO we should see a good reduction of required memory and smaller growth over time. To get some meaningful figures would be nice to use a test as simple as the above but it is possible? Btw I trust inspect and gc only to a certain level...

[web2py] Re: web2py 2.0 stats

2012-08-29 Thread Changju
Thrilled ! On Wednesday, August 29, 2012 12:35:15 PM UTC+9, Massimo Di Pierro wrote: It is ready but we cannot stop tweaking it ... we replaced 16,000 lines of code and we added 41,000 new lines when compared with web2py 1.99.2 (minified js count as one line). We may release it tomorrow.

Re: [web2py] Re: Mercurial not found

2012-08-29 Thread Sergi Pons Freixes
On 28 Aug 2012, at 9:40 AM, Massimo Di Pierro massimo@gmail.com wrote: Which web2py version? which python version? It's with Python 2.6.6, web2py stable (1.99.7). But I noticed that I also have python 2.5.5 installed on my system, and grepping web2py files I can see several calls to

[web2py] Re: web2py 2.0 stats

2012-08-29 Thread Cliff Kachinske
Woo Hoo! On Tuesday, August 28, 2012 11:35:15 PM UTC-4, Massimo Di Pierro wrote: It is ready but we cannot stop tweaking it ... we replaced 16,000 lines of code and we added 41,000 new lines when compared with web2py 1.99.2 (minified js count as one line). We may release it tomorrow.

[web2py] Simultaneously insert in two tables within one form

2012-08-29 Thread jw
I have a quite similar question to this unrepleyd post: https://groups.google.com/forum/?fromgroups=#!searchin/web2py/form$20simultaneously$20insert/web2py/w44ZEk0ODsk/aCy4XmPmQmQJ I try to realize one form within two tables get an insert by accepting the form. db.card.subject_id.default =

[web2py] How to pass html text field value to the controller function?

2012-08-29 Thread Amit
Hi, I have to send textfield value from html to controller function, how to achieve it, please see the code below : input value=Save type=button name=save_button onClick = 'window.location={{=URL('default', 'record_config ',args[])}};' I have one text field on html page named record

[web2py] Re: {{code}} compile in view

2012-08-29 Thread lucas
what using restricted or snapshot? would that be best and is it visible to us normal web2py users? --

[web2py] post deleted

2012-08-29 Thread peter
I added a post called routes.py and patterns with routes_app and it has been deleted within an hour of being added. Does anyone know why? Thanks Peter --

Re: [web2py] post deleted

2012-08-29 Thread Marin Pranjić
I am receiving every post on email, and I didn't get yours. No one deleted it because I would still get it. So it wasn't even posted. Not sure why. It must be some error with google groups. It could happen... On Wed, Aug 29, 2012 at 1:20 PM, peter peterchutchin...@gmail.com wrote: I added a

[web2py] routes.py and patterns with routes_app

2012-08-29 Thread peter
I will try this post again, unfortunately I did not have a copy I tried this example routes.py #!/usr/bin/python # -*- coding: utf-8 -*- routes_app = ((r'/(?Pappwelcome|admin|app)\b.*', r'\gapp'), (r'(.*)', r'myapp'), (r'/?(.*)', r'myapp')) I restarted the server

Re: [web2py] post deleted

2012-08-29 Thread peter
I saw it up there, and then later it was deleted. I could actually click on the link and when I did this, it said that the post had been deleted. As you say maybe it is a bug in google groups. I will always click email updates to me, then at least I will have a copy. Peter On Wednesday, 29

[web2py] Re: post deleted

2012-08-29 Thread Anthony
I've seen posts disappear and then re-appear -- could be a GG bug. Anthony On Wednesday, August 29, 2012 7:20:27 AM UTC-4, peter wrote: I added a post called routes.py and patterns with routes_app and it has been deleted within an hour of being added. Does anyone know why? Thanks

[web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread Anthony
routes_app is used to tell the routing system which applications have their own application specific routes.py (in the application folder rather than the web2py root folder). I think you want to use routes_in (probably with a matching routes_out) instead. See

[web2py] Submit two SQLFORMs in one go

2012-08-29 Thread Daniel Gonzalez
Hi, I have two forms which I am creating using SQLFORM. I need two forms because I want to style the presentation in such a way that the fields are distributed across the page using a specific layout. I want both forms to be presented to the user as a single form, with only one submit button.

[web2py] Re: {{code}} compile in view

2012-08-29 Thread Anthony
You could use the Python exec command to execute the code, but if any of the code comes from users, this is a very bad idea, as any malicious code (or even a mere mistake) could do a lot of damage. Anthony On Tuesday, August 28, 2012 11:36:54 PM UTC-4, lucas wrote: hello one and all, i

[web2py] Re: field attributes outside field definition.

2012-08-29 Thread Anthony
attributes = dict(type='datetime', default=request.now, ...) ... Field('createdOn', **attributes) Anthony On Wednesday, August 29, 2012 2:17:57 AM UTC-4, Annet wrote: In my models I have the following table definition: db.define_table('node', Field('computedName',length=128),

[web2py] Re: Mercurial not found

2012-08-29 Thread Nico Zanferrari
There is exactly the same problem with http://www.pythonanywhere.com (they use python 2.6.6 and web2py 1.99.7). But I've found that it imports: from mercurial import ui, hg, cmdutil, scmutil and in fact the *scmutil *fails to be imported manually. Maybe you need an updated version of

[web2py] Re: user login tables

2012-08-29 Thread Yebach
I used cookie and set db name there. It kind of works :) I will try out your solution. One more question though. I want a redirect after user logouts. And not to go to default/index page but my specific school/index. I am trying with

[web2py] LOAD and redirect

2012-08-29 Thread Daniel Gonzalez
(This is a repetition of an old question: https://groups.google.com/d/topic/web2py/P3QdabVxGiE/discussion) Basically, I have a view with a LOAD. When the form is submitted, I want the browser to be redirected to another page. But since the redirection happens within the LOAD, the new page is

[web2py] Re: LOAD and redirect

2012-08-29 Thread Daniel Gonzalez
I have tried with client_side: redirect(URL(r = request, c = 'signup', f = 'agent_redirect'), client_side = True) And this is my LOAD: {%=LOAD(c='quick_setup', f='quick_setup_form', ajax=True)%} With client_side=True the situation has changed (but not solved): the redirect is not

Re: [web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread Richard Vézina
That's different... Did you use the other plugin required by lazy option?? If not, you need to hack a bit the lazy option in order to trigger the event that will allow lazy option to filter your second drop down... I have some code about that, feel free to ask depending of your need. It's just

[web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread peter
Okay, I get it now, routes_app does not select the application, only where to get the substitute routes.py. The book is right with hindsight, but did not lead me to the right understanding. Maybe it should be clearer that it only controls which routes.py is used. The phrase This is enabled

Re: [web2py] How to pass html text field value to the controller function?

2012-08-29 Thread Richard Vézina
You need to make ajax call... There is web2py ajax, but you may need something more powerfull : jQuery.ajax(). I assume that if you need to pass data back to controller function it because you want to display or modified your form base on the input value... I will need more information in order

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread Jonathan Lundell
On 29 Aug 2012, at 6:46 AM, peter peterchutchin...@gmail.com wrote: Okay, I get it now, routes_app does not select the application, only where to get the substitute routes.py. The book is right with hindsight, but did not lead me to the right understanding. Maybe it should be clearer that it

[web2py] Re-populating a form according to user input

2012-08-29 Thread Daniel Gonzalez
Hi, I have a very common situation. The user has to choose a country and a city. For both fields, I am using a select component. The possible choices in the city component depend on what the user has selected in the country component. So what I would like to do is: 1. The user selects the

[web2py] Re: Re-populating a form according to user input

2012-08-29 Thread Anthony
This is a very frequent request -- we should probably have some built in functionality to handle this. In the meantime, check out http://stackoverflow.com/questions/8146260/best-practice-for-populating-dropdown-based-on-other-dropdown-selection-in-web2p/8152910#8152910 for some ideas. Anthony

Re: [web2py] Re-populating a form according to user input

2012-08-29 Thread Richard Vézina
lazy option plugin : http://dev.s-cubism.com/plugin_lazy_options_widget There is a dependence, but you can avoid using autocomplete plugin, you just need to trigger the event required by lazy option in order to make it works with a regular dropbox. I can provide a example of the js required for

Re: [web2py] Simultaneously insert in two tables within one form

2012-08-29 Thread Richard Vézina
Did you read this ? http://web2py.com/books/default/chapter/29/7#One-form-for-multiple-tables Richard On Wed, Aug 29, 2012 at 6:03 AM, jw jenswo...@googlemail.com wrote: I have a quite similar question to this unrepleyd post:

[web2py] How to use DAL with effective dated queries

2012-08-29 Thread Remco Boerma
Hi, Given a table like define_table(‘person’,Field(‘EmployeeID’),Field(‘name’),Field(‘effdt’,type=’date’)) And having a persons name changed on a specific date: |1| 1234 | G. Single | 2008-01-01 | |2| 1234 | G. Single-Married | 2012-08-01 | |3| 1234 | G. Single | 2015-05-01 | |4| 5678 | S.

[web2py] How can I make SQLFORM upload field look better?

2012-08-29 Thread Cliff Kachinske
When editing, SQLFORM renders the upload field (Specification) like this: https://lh6.googleusercontent.com/-PGdvG8ISPSY/UD4eLsS5xkI/ACg/DlnybydD0BM/s1600/upload_field.png ' Personally I think this is confusing to the user. Because the file link is so small and the empty upload

Re: [web2py] Re: How to call controller function upon onClick from html?

2012-08-29 Thread Anthony
Button type=button name =seeting_button onclick = 'window.location={{=URL('default', 'record_config', args=[name_text_field.value])}};' You cannot refer to name_text_field the way you have. Everything inside {{..}} is Python and must be available on the server before the HTML is rendered

[web2py] Re: How to pass html text field value to the controller function?

2012-08-29 Thread Anthony
See https://groups.google.com/d/msg/web2py/z8-jyLTy-_w/0fJ34fL8JysJ. Anthony On Wednesday, August 29, 2012 6:18:57 AM UTC-4, Amit wrote: Hi, I have to send textfield value from html to controller function, how to achieve it, please see the code below : input value=Save type=button

[web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread Anthony
See http://stackoverflow.com/questions/8146260/best-practice-for-populating-dropdown-based-on-other-dropdown-selection-in-web2p/8152910#8152910 for links to some other related recipes. Anthony On Wednesday, August 29, 2012 3:04:10 AM UTC-4, lyn2py wrote: Thank you Anthony and Richard, I

[web2py] Re: LOAD and redirect

2012-08-29 Thread Anthony
Have you replaced your web2py.js with the one from trunk -- that is need for the client_side=True to work? Anthony On Wednesday, August 29, 2012 9:28:02 AM UTC-4, Daniel Gonzalez wrote: I have tried with client_side: redirect(URL(r = request, c = 'signup', f = 'agent_redirect'),client_side

Re: [web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread Richard Vézina
Here the code for use a regular drop down and avoid use of autocomplete plugin dependency. In controller : conditional_field_trigger_selected_event_js = '$(select[name=FIRSTFIELDNAME]).change(function() {var val = $(this).children(:selected).attr(value);$(this).trigger($(this).attr(id) +

Re: [web2py] Re: How to pass html text field value to the controller function?

2012-08-29 Thread Richard Vézina
Here the code to use a regular drop down and avoid use of autocomplete plugin dependency. In controller : conditional_field_trigger_selected_event_js = '$(select[name=FIRSTFIELDNAME]).change(function() {var val = $(this).children(:selected).attr(value);$(this).trigger($(this).attr(id) +

Re: [web2py] FORM with a SELECT and a mapping

2012-08-29 Thread Richard Vézina
I would make a lookup table instead of using IS_IN_SET(), than use IS_IN_DB(db, 'countries.country_code', db.countries.country_name)... db.define_table('countries', Field('country_code',...), Field('country_name',...)) Richard On Wed, Aug 29, 2012 at 3:15 AM, Daniel Gonzalez

Re: [web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread lyn2py
Thank you Richard I would very much appreciate that. My current problem is what to put in the controller (what to return) so that the Ajax call gets the HTML (per the code below, i.e. function(html) ) it needs. Specifically, my issue is at this part of the code: jQuery.ajax({type:

Re: [web2py] web2py 2.0 stats

2012-08-29 Thread Manuele Pesenti
Il 29/08/2012 05:35, Massimo Di Pierro ha scritto: It is ready but we cannot stop tweaking it ... we replaced 16,000 lines of code and we added 41,000 new lines when compared with web2py 1.99.2 (minified js count as one line). We may release it tomorrow. fico!!! M. -- --

[web2py] Re: user login tables

2012-08-29 Thread Anthony
And not to go to default/index page but my specific school/index. I am trying with auth.settings.logout_next=URL(r=request,c='school',f='index') but it is not working. Where do I write this code? To controler or model? If it is right at all You would put that code in the model, after

[web2py] Re: web2py 2.0 stats

2012-08-29 Thread Anthony
How many total lines of code, not including anything in /applications or /contrib? Anthony On Tuesday, August 28, 2012 11:35:15 PM UTC-4, Massimo Di Pierro wrote: It is ready but we cannot stop tweaking it ... we replaced 16,000 lines of code and we added 41,000 new lines when compared

[web2py] Re: Deploying as RPM

2012-08-29 Thread Massimo Di Pierro
Can you tell us more. Perhaps share an example that packages web2py On Tuesday, 28 August 2012 23:05:16 UTC-5, LightDot wrote: I'm distributing and supporting a project made with web2py as a set of RPMs (RHEL/CentOS/SL) for a while now. No big problems... I use Mock on SL6 to generate the

[web2py] Re: Ckeditor(plugin) using the LOAD (....., ajax = True)

2012-08-29 Thread Massimo Di Pierro
Can you tell us more. On Wednesday, 29 August 2012 00:00:17 UTC-5, Picheth wrote: I have a problem with the ckeditor function LOAD (., ajax = True) error : It pass the wrong part. please .. any help, cues or snippets of codes to accomplish this ... will be greatly appreciated

[web2py] Re: post deleted

2012-08-29 Thread Massimo Di Pierro
We do not delete posts unless the user requests it. We only filter out posts that contain advertisements or spam. I do not know what happened. On Wednesday, 29 August 2012 06:20:27 UTC-5, peter wrote: I added a post called routes.py and patterns with routes_app and it has been deleted

[web2py] Re: FORM with a SELECT and a mapping

2012-08-29 Thread Anthony
SELECT([OPTION(countries[code], _value=code) for code in countries]) Anthony On Wednesday, August 29, 2012 3:15:13 AM UTC-4, Daniel Gonzalez wrote: Hi, I have the following map: countries = { 'DE': T('Germany'), 'ES': T('Spain'), 'IT': T('Italy'),

[web2py] Re: Submit two SQLFORMs in one go

2012-08-29 Thread Massimo Di Pierro
You can kind of merge them SQLFORM.factory(db.table1,db.table2) you wil need your own logic to figure out what to do with the data On Wednesday, 29 August 2012 06:54:54 UTC-5, Daniel Gonzalez wrote: Hi, I have two forms which I am creating using SQLFORM. I need two forms because I want to

[web2py] Re: Submit two SQLFORMs in one go

2012-08-29 Thread Marek Mollin
Couple of ideas. There have been some hacks about just appending fields from one SQLFORM with another. I would recomend using SQLFORM.factory. You can add fields just using your model. SQLFORM.factory( db.table.name, db.table.otherfield, db.anothertable.anotherfield, ) If you want it to be

Re: [web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread Richard Vézina
That's lazy option internal code? I don't think you need to touch that for now... You should make sure you initialize the widget correctly... Maybe you should try to make a dummy app that have the plugin install and the tables required to make test, before try with your own app... Could you

[web2py] Re: web2py 2.0 stats

2012-08-29 Thread Massimo Di Pierro
from 35643 in 1.99.7 to 40481 in 2.0.1 (looking at gluon/*.py only) On Wednesday, 29 August 2012 09:38:34 UTC-5, Anthony wrote: How many total lines of code, not including anything in /applications or /contrib? Anthony On Tuesday, August 28, 2012 11:35:15 PM UTC-4, Massimo Di Pierro

Re: [web2py] Re: web2py 2.0 stats

2012-08-29 Thread Richard Vézina
Nice! Richard On Wed, Aug 29, 2012 at 10:50 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: from 35643 in 1.99.7 to 40481 in 2.0.1 (looking at gluon/*.py only) On Wednesday, 29 August 2012 09:38:34 UTC-5, Anthony wrote: How many total lines of code, not including anything in

Re: [web2py] Re: web2py 2.0 stats

2012-08-29 Thread Richard Vézina
Go admin button is gone from the Welcome? Richard On Wed, Aug 29, 2012 at 10:51 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Nice! Richard On Wed, Aug 29, 2012 at 10:50 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: from 35643 in 1.99.7 to 40481 in 2.0.1 (looking at

[web2py] Re: html in session.flash?

2012-08-29 Thread Anthony
Yes, session.flash can be HTML -- you can use web2py HTML helpers or put raw HTML code inside XML(), and it should be rendered properly. session.flash = A('click me', _href=URL(...)) or session.flash = XML('a href=%sclick me/a' % URL(...)) The problem with including a link, though, is that

Re: [web2py] How to pass html text field value to the controller function?

2012-08-29 Thread Amit
Richard, I only have to pass user input value to controller function which will further save or update to the database, like in this case i want to save/update record name value which user can change from UI so i need to pass this updated value back to controller and controller function will save

Re: [web2py] Re: web2py 2.0 stats

2012-08-29 Thread Ezugworie Ikechukwu
Impatiently waiting On Wed, Aug 29, 2012 at 3:53 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Go admin button is gone from the Welcome? Richard On Wed, Aug 29, 2012 at 10:51 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Nice! Richard On Wed, Aug 29, 2012 at 10:50

Re: [web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread lyn2py
Yes that is the internal code. I don't understand the example given. I have tested it but I don't know what I'm missing. My setup is also different than the example given in their website. My current and only bottleneck is what value to return to the ajax call. I have tried SQLTABLE(rows),

Re: [web2py] Re: web2py 2.0 stats

2012-08-29 Thread Kevin Miller
I have been waiting to hear that for the longest while. Release it :-) On Wed, Aug 29, 2012 at 9:55 AM, Ezugworie Ikechukwu ezugworie.ikechu...@gmail.com wrote: Impatiently waiting On Wed, Aug 29, 2012 at 3:53 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Go admin button is gone

Re: [web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread Richard Vézina
Can you provide : Models (for the concerned tables) Controller (page form concerned) View (of the function page) It will be easier to help. Richard On Wed, Aug 29, 2012 at 10:56 AM, lyn2py lyn...@gmail.com wrote: Yes that is the internal code. I don't understand the example given. I have

[web2py] routes.py and patterns with routes_app

2012-08-29 Thread peter
I tried the example routes.py, routes_app from routes.example.py #!/usr/bin/python # -*- coding: utf-8 -*- routes_app = ((r'/(?Pappwelcome|admin|app)\b.*', r'\gapp'), (r'(.*)', r'myapp'), (r'/?(.*)', r'myapp')) I am restarting web2py between any changes. If I put a

[web2py] Re: Install in hostgator

2012-08-29 Thread Kevin C
Do you mind sharing how you got it working? I have virtualenv with python 2.7 set up, web2py in my home directory, index.fcgi (Executable) and an .htaccess set up, but still no success. I'm getting Internal Server Errors on every page. Can you share your configuration with us? On Friday,

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread peter
I do not know what docs you are talking about here Jonathan. If the book, then it is very brief on this matter. The example The general syntax for routes is more complex than the simple examples we have seen so far. Here is a more general and representative example: 1. 2. 3. 4. routes_in = (

[web2py] Re: Ticket Issued: Unrecoverable

2012-08-29 Thread Jose Guedez
Hi, I also got this weird error today. The server had been working fine for weeks with the same application code and suddenly started displaying this error. I checked the permissions and even did the recursive chown for the application folder as suggested above with no impact. This issue

[web2py] How to use DAL for Effective dated queries

2012-08-29 Thread Boerma, Remco
Hi, Given a table like define_table('person',Field('EmployeeID'),Field('name'),Field('effdt',ty pe='date')) And having a persons name changed on a specific date: |1| 1234 | G. Single | 2008-01-01 | |2| 1234 | G. Single-Married | 2012-08-01 | |3| 1234 | G. Single | 2015-05-01 | |4|

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread peter
I am not sure what docs you are referring to Jonathan. The book gives an example: The general syntax for routes is more complex than the simple examples we have seen so far. Here is a more general and representative example: 1. 2. 3. 4. routes_in = (

Re: [web2py] Re: Ticket Issued: Unrecoverable

2012-08-29 Thread Richard Vézina
Maybe OS update had broke something... In shell I don't think all import are imported, so maybe you have a library missing. But the only time I get tikect unrecovrable is when there an issue with permissions over web2py and app files and folders. Richard On Wed, Aug 29, 2012 at 11:00 AM,

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread Jonathan Lundell
On 29 Aug 2012, at 8:13 AM, peter peterchutchin...@gmail.com wrote: I am not sure what docs you are referring to Jonathan. The book gives an example: The general syntax for routes is more complex than the simple examples we have seen so far. Here is a more general and representative example:

[web2py] Re: LOAD and redirect

2012-08-29 Thread Daniel Gonzalez
I am now running: b232a2d : mdipierro : 11 minutes ago : catchmissing winservice And the problem is still there. On Wednesday, August 29, 2012 4:24:49 PM UTC+2, Anthony wrote: Have you replaced your web2py.js with the one from trunk -- that is need for the

[web2py] Re: FORM with a SELECT and a mapping

2012-08-29 Thread Daniel Gonzalez
Thanks Anthony, it works! I have prepared this wrapper, useful for newbies like me: def form_prepare_opts(mydict): return [OPTION(mydict[code], _value=code) for code in mydict] And then, in the controller function: countries_opts = form_prepare_opts(countries) Which can be used to

[web2py] Re: LOAD and redirect

2012-08-29 Thread Anthony
Updating trunk doesn't update the web2py.js file in your application (it's in /applications/yourapp/static/js), so you have to update that file manually. You can copy it from the welcome app (assuming you did update the welcome app from trunk). Anthony On Wednesday, August 29, 2012 11:24:49

Re: [web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-29 Thread lyn2py
OK sure :) MODELS db.define_table('quotations', Field('company_id','reference companies'), Field('contact_id','reference contacts', widget=lazy_options_widget('jsChangeOn','jsChangeOff', lambda customer_id: (db.contacts.customer_id == customer_id),

Re: [web2py] How to turn retrieved rows into a SELECT?

2012-08-29 Thread lyn2py
In addition, I have tried IS_IN_DB(...), however the db([query]) will require a variable which can be loaded by the ajax call (which I have bolded it, in the code below). But I don't know how I can make the two meet (set IS_IN_DB and pass a variable to it on-the-fly). My query is simple: query

[web2py] Re: {{code}} compile in view

2012-08-29 Thread lucas
ok, that is fine for simple code execution, but what of the more complex? how does web2py execute all of that complex code we can embed within a view? that is what i want to reproduce in my scheme. --

[web2py] Re: LOAD and redirect

2012-08-29 Thread Daniel Gonzalez
Ok, I didn't know that. Thanks. Anyway, even after updating web2py.js in my app, the redirect is not working. I think my LOAD component: {%=LOAD(c='quick_setup', f='quick_setup_form', ajax=True, ajax_trap=True )%} Is being replaced by the following markup during the redirect: script

[web2py] Re: web2py 2.0 stats

2012-08-29 Thread apps in tables
How is the difference in the number of lines of the documentation (book) ? Ashraf --

[web2py] Overwrite readable/writable

2012-08-29 Thread Alec Taylor
I'm sure I read somewhere in the documentation that I can overwrite the `readable=False` and the `writeable=False` values… But I couldn't find it! It mentioned that it was the same technique used in appadmin. I would like to generate an update form that has overwritten all the readable/writable

[web2py] Re: Submit two SQLFORMs in one go

2012-08-29 Thread Paolo
Hi all, with SQLFORM.factory allows you very easily to create form in order to insert data but when you have to edit the same form you will find many problems. Your idea of changing the default values is nice and actually could solve this lack but from my point of view it would be nice to have

[web2py] Re: Overwrite readable/writable

2012-08-29 Thread Annet
I think this is what you're looking for: SQLFORM(table,...,ignore_rw =True,...) Annet --

[web2py] Question about multiple OAuth (Twitter or Facebook) Problem.

2012-08-29 Thread JungHyun Kim
Hello, I am trying multiple login methods- Twitter or Facebook. I want to know the best practice to support multiple login methods (multiple OAuth). Currently, I got a problem. I can redirect to login form of facebook or twitter. But after I successfully logged in the OAuth providers, I can't

Re: [web2py] Re: Ticket Issued: Unrecoverable

2012-08-29 Thread Massimo Di Pierro
Did you update the OS or web2py? If web2py, make sure you update once more have the latest. On Wednesday, 29 August 2012 10:15:14 UTC-5, Richard wrote: Maybe OS update had broke something... In shell I don't think all import are imported, so maybe you have a library missing. But the

[web2py] Re: LOAD and redirect

2012-08-29 Thread Massimo Di Pierro
Something is wrong. I do not think your LOAD generates that script..., the url is incomplete. Try this instead: LOAD('quick_setup','quick_setup_form', ajax=True, ajax_trap=True) On Wednesday, 29 August 2012 11:19:05 UTC-5, Daniel Gonzalez wrote: Ok, I didn't know that. Thanks. Anyway, even

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread peter
I tried routes_in = ((r' .*://localhost:.*',r'/welcome'),) and routes_in = ((r' .*localhost.*',r'/welcome'),) neither match localhost urls so I am at a loss. I would like to know how to match localhost. In the short run I want to do domains={ 'ukjazz.net':'british_jazz',

[web2py] Re: web2py 2.0 stats

2012-08-29 Thread Massimo Di Pierro
Oops. We have still to work on that. On Wednesday, 29 August 2012 11:23:07 UTC-5, apps in tables wrote: How is the difference in the number of lines of the documentation (book) ? Ashraf --

[web2py] Re: field attributes outside field definition.

2012-08-29 Thread Annet
Hi Anthony, Thanks for your reply. I am not sure I completely understand **attributes does. Is it documented somewhere? Will this work: attributes = dict(type='datetime',default=request.now,requires=IS_DATETIME(format='%Y-%m-%d %H:%M:%S'),writable=False,readable=False,represent = lambda v,

Re: [web2py] Re: {{code}} compile in view

2012-08-29 Thread Bruno Rocha
You can use template render from gluon.template import render html = b{{=name}}/b {{for x in range(10)}} Hellobr {{pass}} print render(content=html, context=dict(name=Bruno)) On Wed, Aug 29, 2012 at 1:14 PM, lucas sjluk...@gmail.com wrote: ok, that is fine for simple code execution, but

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread Massimo Di Pierro
Are you trying to match the remote address as localhost? The problem is that it depends on what you browser puts in there. You can try: routes_in = [('127\.0\.0\.1:http://.*?:(GET|POST) /$anything','/welcome')] On Wednesday, 29 August 2012 12:08:56 UTC-5, peter wrote: I tried routes_in

[web2py] Re: field attributes outside field definition.

2012-08-29 Thread Massimo Di Pierro
http://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/ On Wednesday, 29 August 2012 12:14:09 UTC-5, Annet wrote: Hi Anthony, Thanks for your reply. I am not sure I completely understand **attributes does. Is it documented somewhere? Will this work: attributes =

[web2py] semantic plugin issue

2012-08-29 Thread juaneduardo
Hi everybody. I'm using the semantic plugin for a Linked Data Project. http://web2py.com/semantic Actually I have many problems validating the rdf's I suspect that the semantic plugin is based in a prior RDF specification... is that true? The plugin is actually mantained? I'm solving some

Re: [web2py] Re: Overwrite readable/writable

2012-08-29 Thread Alec Taylor
Thanks On Thu, Aug 30, 2012 at 2:51 AM, Annet anneve...@googlemail.com wrote: I think this is what you're looking for: SQLFORM(table,...,ignore_rw =True,...) Annet -- --

[web2py] Re: web2py 2.0 stats

2012-08-29 Thread apps in tables
Examples and Self explanatory documentation will save you a lot questions, specially from me:) Ashraf --

[web2py] Re: field attributes outside field definition.

2012-08-29 Thread Anthony
On Wednesday, August 29, 2012 1:14:09 PM UTC-4, Annet wrote: Hi Anthony, Thanks for your reply. I am not sure I completely understand **attributes does. Is it documented somewhere? That's not web2py specific -- it's just standard Python. It's a way of passing a dictionary to a function as

[web2py] Re: {{code}} compile in view

2012-08-29 Thread Anthony
On Wednesday, August 29, 2012 12:14:24 PM UTC-4, lucas wrote: ok, that is fine for simple code execution, but what of the more complex? how does web2py execute all of that complex code we can embed within a view? that is what i want to reproduce in my scheme. exec code in environment is

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread Jonathan Lundell
On 29 Aug 2012, at 10:08 AM, peter peterchutchin...@gmail.com wrote: I tried routes_in = ((r' .*://localhost:.*',r'/welcome'),) and routes_in = ((r' .*localhost.*',r'/welcome'),) neither match localhost urls so I am at a loss. I would like to know how to match localhost. If

[web2py] Re: LOAD and redirect

2012-08-29 Thread Anthony
The client-side redirect is relatively new -- perhaps something is wrong. Can you pack and attach a minimal app the replicates the problem? Anthony On Wednesday, August 29, 2012 12:19:05 PM UTC-4, Daniel Gonzalez wrote: Ok, I didn't know that. Thanks. Anyway, even after updating web2py.js

  1   2   >