Re: [web2py] Question about views syntax

2012-03-05 Thread Johann Spies
On 2 March 2012 18:18, davidkw wrote: > I've looked through the views chapter, but I'm not sure what these > brackets [ ] are doing in this line. > > [ {{=A('search', _href=URL('search'))}} ] > > What do the brackets around the link syntax do? Thanks. > > They place the url in square brackets :)

Re: [web2py] Date search and smartgrid

2012-03-05 Thread Johann Spies
On 2 March 2012 19:20, Roberto Perdomo wrote: > Sorry, the date search is implemented in grid and smartgrid? > > I Haven a table only with date fields and this option not works > It works here. Here is an example of a query built with the 'query' button: akb_authors.birthdate > "1950-02-15"

Re: [web2py] Use the other login page instead of index

2012-03-05 Thread Sanjeet Kumar
Actually i want to go to the another function in the default controller when i click on the login it should be call the function such as emp() istead of index and after login i want to stay on the emp() only On Mon, Mar 5, 2012 at 1:14 PM, Bruno Rocha wrote: > the login is by default in defautl/

Re: [web2py] Re: web2py[:]

2012-03-05 Thread Johann Spies
+1 -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

[web2py] form.element() focus

2012-03-05 Thread Annet
In my init_ajax.js file I set this: jQuery("input:text:not(.date):first:visible").focus(); I have a form in which I set the first field to: form.element('#no_table_name')['_readonly']=True ... therefore, in this single form, I would like to give the second form field the focus (the form shares

[web2py] Re: Trunk from GIT?

2012-03-05 Thread lyn2py
Thank you all, I looked at the VERSION file and it said "stable", so I thought it was the stable version. It actually is the trunk version right? On Monday, March 5, 2012 4:15:52 AM UTC+8, Anthony wrote: > > The mdipierro one looks to be the latest stable version. I was looking >> for the trunk

[web2py] web2py TImeout

2012-03-05 Thread Phyo Arkar
What is default timeout for JSONRPC requests in web2py? I set timeout to 60 seconds at qooxdoo's rpc.setTimeout() which is 10 mins but it always time out at 1.1 mins (while receiving Data) . JSON Data goes over slow line (256kbps) But it is over 10mb of rows . Thanks.

[web2py] SQLFORM and scientific notation support.

2012-03-05 Thread Kimmo
Hi, I have an update SQLFORM for db record which includes double type fields. I noticed that the form does not permit values for example "1e6". Letter "e" is automatically removed when it's typed in. Behaviour is understandable but is there a way to get scientific notation support for double fiel

Re: [web2py] Re: web2py 1.99.5 is OUT

2012-03-05 Thread Phyo Arkar
Regarding download corruption and timeout on slow lines , if i host on non-rocket http server does it fixed? (cherokee . etc). also how about handling uploads/download seprately using another web server? On Sat, Mar 3, 2012 at 12:31 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > be

Re: [web2py] Use the other login page instead of index

2012-03-05 Thread Sanjeet Kumar
My problem is solved through capturing the login event On Mon, Mar 5, 2012 at 1:48 PM, Sanjeet Kumar wrote: > Actually i want to go to the another function in the default controller > when i click on the login it should be call the function such as emp() > istead of index and after login i want

Re: [web2py] SQLFORM and scientific notation support.

2012-03-05 Thread Manuele Pesenti
Il 05/03/2012 11:18, Kimmo ha scritto: Hi, I have an update SQLFORM for db record which includes double type fields. I noticed that the form does not permit values for example "1e6". Letter "e" is automatically removed when it's typed in. Behaviour is understandable but is there a way to get sci

[web2py] Re: Trunk from GIT?

2012-03-05 Thread Tim Michelsen
Hi, web2py was not owned my be. Now it is. I will move trunk from mdipierro/web2py to web2py/web2py. Probably later today. I'd be interested to know how you keep github auomatically in sync with your mercurial stuff. Could you explain that? Thanks.

Re: [web2py] Re: web2py 1.99.5 is OUT

2012-03-05 Thread Massimo Di Pierro
On Monday, 5 March 2012 04:19:07 UTC-6, Phyo Arkar wrote: > > Regarding download corruption and timeout on slow lines , the timeout can be set. There is a web2py.py command line option. The download corruption has been reported by some but I was unable to reproduce (on mac and linux). Do you e

Re: [web2py] SQLFORM and scientific notation support.

2012-03-05 Thread Massimo Di Pierro
Actually I think the problem is simply the JS validator. Try comment this line in static/js/web2py.js doc.on('keyup', 'input.double, input.decimal', function(){this.value=this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g,'').reverse();}); On Monday, 5 March 2012 05:25:3

[web2py] Invalid Query invalid literal for int() with base 10: '12f'

2012-03-05 Thread rinosh
After i insert into the table. i get that the record is inserted. But when i go to http://127.0.0.1:8000/patient_test/appadmin/select/db i get Invalid Query invalid literal for int() with base 10: '12f' and no value is listed. What should i do?

Re: [web2py] Re: web2py 1.99.5 is OUT

2012-03-05 Thread Phyo Arkar
> > Do you experience the problem? Yes it happens even on large JSON output (rows of table as json . about 20 MB) also , it courrpts in between (not server timeout but json at recving get corrupted) On Mon, Mar 5, 2012 at 6:48 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Do you

[web2py] Re: form.element() focus

2012-03-05 Thread Alan Etkin
I think there is not (not sure). But what if more than one field has focus set to True? A workaround is to set focus on document load with jQuery in a view script: $(document).ready(function(){$("#no_table_cocNumber").focus();}); On Mar 5, 5:49 am, Annet wrote: > In my init_ajax.js file I set t

[web2py] Re: Invalid Query invalid literal for int() with base 10: '12f'

2012-03-05 Thread Alan Etkin
How is the insertion made (with a custom form, from the appadmin interface)?. It might be that the db stored an incompatible data format for the model definition. If your application is providing a form, make sure that it uses validation. On Mar 5, 9:13 am, rinosh wrote: > After i insert into the

[web2py] Re: smartgrid query on 2 or more tables

2012-03-05 Thread Roderick
Hi Johann I'm really struggling to figure out the DAL query syntax (the documentation I could find has minimalistic examples)... So, can you please help me - how do I do this: "as long as all the tables are presented in the original query" query = ? form = SQLFROM.grid(query,...) I.e. I need a g

[web2py] Re: SQLFORM and scientific notation support.

2012-03-05 Thread Kimmo
Thank you again for your quick response! I commented out the line and I can now submit E notation values like "1e-06" which is excellent. After testing I noticed that if you return to see the update form again the field will show value "1e-06.00" and if you press submit it will produce a warning

Re: [web2py] SQLFORM and scientific notation support.

2012-03-05 Thread Anthony
On Monday, March 5, 2012 7:22:05 AM UTC-5, Massimo Di Pierro wrote: > > Actually I think the problem is simply the JS validator. Try comment this > line in static/js/web2py.js > > doc.on('keyup', 'input.double, input.decimal', > function(){this.value=this.value.reverse().replace(/[^0-9\-\.,]|[\-]

Re: [web2py] Re: smartgrid query on 2 or more tables

2012-03-05 Thread Johann Spies
On 5 March 2012 15:21, Roderick wrote: So, can you please help me - how do I do this: > "as long as all the tables are presented in the original query" > query = ? > form = SQLFROM.grid(query,...) > > I.e. I need a grid that displays all data from all 10 of my tables so > my users can run a compl

Re: [web2py] Re: web2py 1.99.5 is OUT

2012-03-05 Thread Phyo Arkar
I think i am going to implement a file server (for upload and download) using Tornado while Rocket is unstable at that. My work requires huge amount of GBs of data to be uploaded / downloaded by users. What you guys recommend? a separate Tornado server , (coz i would like upload progressbar) or a

Re: [web2py] Re: web2py 1.99.5 is OUT

2012-03-05 Thread Vasile Ermicioi
have you tried uwsgi?

Re: [web2py] Re: web2py 1.99.5 is OUT

2012-03-05 Thread Phyo Arkar
never yet , does that resolve most of the issues? On Mon, Mar 5, 2012 at 9:51 PM, Vasile Ermicioi wrote: > have you tried uwsgi?

Re: [web2py] Re: web2py 1.99.5 is OUT

2012-03-05 Thread Phyo Arkar
corrupted download / upload problems. On Mon, Mar 5, 2012 at 9:55 PM, Phyo Arkar wrote: > never yet , does that resolve most of the issues? > > On Mon, Mar 5, 2012 at 9:51 PM, Vasile Ermicioi wrote: > >> have you tried uwsgi? > > >

[web2py] Translations file

2012-03-05 Thread Bruce Wade
Hi, I gave someone a translation file to translate, however when I put the new file in the languages folder it gets overridden by web2py automatically. Any specific reason this would happen? -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.w

[web2py] Re: Translations file

2012-03-05 Thread Bruce Wade
Was able to resolve the problem, the file was encoded as: GB18030 changing to UTF-8 allowed the file to show up again. However I think the framework should give a error like unable to read file etc... instead of just overwriting a file? On Mon, Mar 5, 2012 at 7:29 AM, Bruce Wade wrote: > Hi, >

[web2py] Re: Translations file

2012-03-05 Thread Anthony
Please submit an issue: http://code.google.com/p/web2py/issues/list On Monday, March 5, 2012 10:37:01 AM UTC-5, Detectedstealth wrote: > > Was able to resolve the problem, the file was encoded as: GB18030 changing > to UTF-8 allowed the file to show up again. > > However I think the framework sho

[web2py] Re: improvement in web2py compatibility with legacy postgresql datbases column sequence name

2012-03-05 Thread Bruce Dickey
Hi all, I'm using PostgreSQL with schemas w/ web2py 1.97. The patch shown here from 2 years ago made that work. I just downloaded v1.99.7 and noticed that this patch is not implemented in /gluon/dal.py PostgreSQLAdapter.lastrowid(). So I'm wondering what the outcome of this discussion was --

[web2py] Weird behavior of decimal stored in session.

2012-03-05 Thread Francisco
Hi everyone. I just came across a weird behavior and I'm wondering if it's some kind of bug or just my fault. I have a model for a product like this: db.define_table('products', Field('name',length=128, notnull=True), Field('sale_price',type='decimal(14,4)',default=0, notnull=True)) Now

[web2py] how do I setup a GWT client app for a web2py server app within Eclipse?

2012-03-05 Thread Carl
I've used the excellent video at http://vimeo.com/23145118 as a proof of concept of writing an AJAX app in GWT and have this app communicate with my server based on Web2py. Locally, I've disabled security on Google Chrome using its --disable- web-security flag but a) I'd like to stop doing that an

Re: [web2py] How to use XML data

2012-03-05 Thread Carlos Costa
You can do something like in http://web2py.com/books/default/chapter/29/5 : Parsing The TAG object is also an XML/HTML parser. It can read text and convert into a tree structure of helpers. This allows manipulation using the API above: >>> html = 'Titlethis is a test' >>> parsed_html = TAG(html) >

Re: [web2py] Weird behavior of decimal stored in session.

2012-03-05 Thread Carlos Costa
I dont know why but you can fix it explicitly using Decimal. http://docs.python.org/library/decimal.html#module-decimal 2012/3/5 Francisco : > Hi everyone. I just came across a weird behavior and I'm wondering if it's > some kind of bug or just my fault. > > I have a model for a product like this:

[web2py] Re: Translations file

2012-03-05 Thread Massimo Di Pierro
web2py rewrites language files in order to add translation strings. If it does not find a string, it adds it. The problem in your case is that the file appears corrupted (not utf8, not created by web2py) and therefore it find no translation string and needs to add them all. This is the intended

[web2py] Re: improvement in web2py compatibility with legacy postgresql datbases column sequence name

2012-03-05 Thread Massimo Di Pierro
please open a ticket and append the patch. Perhaps this was an oversight. Massimo On Monday, 5 March 2012 09:55:13 UTC-6, Bruce Dickey wrote: > > > Hi all, > > I'm using PostgreSQL with schemas w/ web2py 1.97. The patch shown here > from 2 years ago made that work. > > I just downloaded v1.99.7

Re: [web2py] Re: Translations file

2012-03-05 Thread Bruce Wade
Wouldn't it be better to get an ticket saying it can't read the file? Instead of just truncating the file/creating a new file? At least if there was an error we would know the problem, it was just a fluke that I noticed the formatting was not UTF-8 because I gave it to a translator to change using

[web2py] Using MYSql with DAL

2012-03-05 Thread Vijeenrosh PW Vijeen
Hello , greetings to all, Iam an new web2py user . Iam picking up the basics from the documetation provided there . In those only SQLite in conjuction with the DAL is explained . Unfortunately I have to use MySQL as the database. could somebody point out how to use mysql in conjuction with D

[web2py] Re: how do I setup a GWT client app for a web2py server app within Eclipse?

2012-03-05 Thread Carl
After a walk in some sunshine... Place the war folder under web2py's static folder (just like using pyjs.org) On Mar 5, 4:18 pm, Carl wrote: > I've used the excellent video athttp://vimeo.com/23145118as a proof > of concept of writing an AJAX app in GWT and have this app communicate > with my s

[web2py] Re: Using MYSql with DAL

2012-03-05 Thread Alan Etkin
Have a look at the sections "Dependencies" and "Connection strings" in the book chapter "The database abstraction layer" You will need a db driver for your system (check if it's already installed): pymysql or MySQLdb Replace the uri string in DAL(...) with something like this mysql://username:pa

[web2py] Re: Translations file

2012-03-05 Thread Alan Etkin
Maybe allowing to override the behavior with a initial argument? In that way, developers could do: T.no_overwrite = True And default to the normal file managing. On Mar 5, 2:13 pm, Massimo Di Pierro wrote: > web2py rewrites language files in order to add translation strings. If it > does not f

[web2py] Re: Legacy databases

2012-03-05 Thread Ralo Tannahill
Is it safe (from the perspective of queries syntax or stability) to use MySQLdb in web2py (DAL), or is it better to use it "manually" as an import and use raw SQL for accessing MySQL 3? If have found this url showing the changes needed http://code.google.com/p/web2py/source/diff?spec=svnfc75444ca

Re: [web2py] Re: Translations file

2012-03-05 Thread Bruce Wade
That could work but my point is when I opened the file in a text editor everything looked fine, however it was then overwritten so I was clueless as to why it was happening, until I went to save as and seen the encoding. Once I changed it to UTF-8 the file was no longer overwritten. -- Regards, Br

[web2py] Re: Last Day for Submissions! -- Web2py Application Exhibition Version 3.0

2012-03-05 Thread spiffytech
When will the winners be announced? On Feb 14, 11:04 pm, NetAdmin wrote: > Hello All, > > February 15 is the last day for submissions for the > Web2pyApplicationExhibitionVersion 3.0 so don't delay! > > For more details, see the pinned message at the top of the news-group. > > Mr.NetAdmin > > M

[web2py] Re: web2py 1.99.7 is OUT

2012-03-05 Thread spiffytech
Have you considered publishing release candidates ~1 week ahead of a release, to allow early-adopters to upgrade and see what's broken, rather than having the rapid stream of releases? I saw you said "I'm releasing 1.99.5 tomorrow, please test it today", but that's rather a short and informal testi

Re: [web2py] Re: web2py[:]

2012-03-05 Thread Omi Chiba
> > It looks great !!

Re: [web2py] Re: Translations file

2012-03-05 Thread Anthony
I agree -- if the file exists and appears corrupted, a warning or error would be more appropriate rather than silent overwriting (particularly since "corruption" will most likely just be a different encoding). Anthony On Monday, March 5, 2012 1:20:26 PM UTC-5, Detectedstealth wrote: > > That co

Re: [web2py] Re: web2py[:]

2012-03-05 Thread Massimiliano
Very nice work! I think it could be a booster for web2py community! Congratulations On Mon, Mar 5, 2012 at 8:25 PM, Omi Chiba wrote: > It looks great !! > > -- Massimiliano

[web2py] more tutorials?

2012-03-05 Thread Larry Wapnitsky
So, I seem to be getting stuck a lot as I'm learning web2py, but I'm not finding the online documentation to be very thorough in answering my questions. Additionally, as much as have enjoyed the assistance I've gotten from the newsgroup so far, the time delay on responses keeps me from working

Re: [web2py] more tutorials?

2012-03-05 Thread Larry Wapnitsky
And this link (http://www.web2py.com/books/default/reference/29/alterego) no longer works, as does the one on redirecting, which is where i"m seriously getting stuck. On Mon, Mar 5, 2012 at 16:18, Larry Wapnitsky wrote: > So, I seem to be getting stuck a lot as I'm learning web2py, but I'm not >

Re: [web2py] Re: Translations file

2012-03-05 Thread Bruce Wade
Bigger issue with the translation file. I had a file where I added 90% of the file that was translated already, and it was missing some keys. The translator then truncated everything and only added the keys that were missing. On Mon, Mar 5, 2012 at 11:26 AM, Anthony wrote: > I agree -- if the f

[web2py] Re: more tutorials?

2012-03-05 Thread Anthony
Maybe some of these will help: http://www.web2py.com/examples/default/examples http://www.web2py.com/AlterEgo (some of these entries are outdated) http://www.web2pyslices.com http://www.web2py.com/examples/default/videos/ http://www.youtube.com/playlist?list=PL5E2E223FE3777851 http://killer-web-dev

[web2py] Re: Unable to stream to ios devices

2012-03-05 Thread nick name
On Friday, March 2, 2012 12:43:03 PM UTC-5, Rajesh Subramanian wrote: > > Hello, > First of all, what a beautiful framework web2py is! Thank you! > > I am having issues streaming a video file to ios devices. > The file is not the problem because the same file plays properly on > those devices w

[web2py] Re: Using MYSql with DAL

2012-03-05 Thread Massimo Di Pierro
replace: db = DAL('sqlite://storage.sqlite') with db = DAL('mysql://username:password@hostname/dbname') replace username, password, hostname and dbname with your own. That's it. Everything is the same as with sqlite. On Monday, 5 March 2012 09:55:10 UTC-6, Vijeenrosh PW Vijeen wrote: > > Hell

[web2py] Re: Legacy databases

2012-03-05 Thread Massimo Di Pierro
It is safer to use the web2py API instead of raw SQL. On Monday, 5 March 2012 12:17:56 UTC-6, Ralo Tannahill wrote: > > Is it safe (from the perspective of queries syntax or stability) to use > MySQLdb in web2py (DAL), or is it better to use it "manually" as an import > and use raw SQL for acces

[web2py] Re: web2py 1.99.7 is OUT

2012-03-05 Thread Massimo Di Pierro
we do. We have the nightly build and we do post release candidates in advance. The problem is that not many people test it. On Monday, 5 March 2012 12:31:49 UTC-6, spiffytech wrote: > > Have you considered publishing release candidates ~1 week ahead of a > release, to allow early-adopters to upg

Re: [web2py] Re: web2py 1.99.7 is OUT

2012-03-05 Thread Michele Comitini
Maybe we should create another label such as "production" or "GA" vs latest (instead of "nightly build"). "production" becomes latest after no major bugs are found for a 5 days. The name change also encourage testing "latest"... on could feel more comfortable at first sight. mic Il 05 marzo 2

[web2py] apache https only need help

2012-03-05 Thread Richard
Hello, Is there someone that could help with configuring apache and possibly nginx for serving only https? Appreciate. Richard

[web2py] Using Spawn in Web2Py with Web2Py Python Implementation

2012-03-05 Thread james c.
At irregular intervals I need to cleanup files written by my application for users. In the documentation it was suggested that one of the possibilities is to launch a script to do this. I'm doing the following from my controller and it works fine: os.spawnl(os.P_NOWAIT, r'C:\Python25\python.exe',

Re: [web2py] Re: web2py 1.99.7 is OUT

2012-03-05 Thread pbreit
Until we have stable and dev branches I'm not sure we need to do any of this. And it still seems like the pace of change would make dev/stable branches difficult. There are a lot of people testing the current changeset so problems get fixed relatively quickly. If you don't want to take a chance

Re: [web2py] Re: web2py 1.99.7 is OUT

2012-03-05 Thread Alvaro Lizama Molina
Again i suggest read this http://nvie.com/posts/a-successful-git-branching-model/ for a best workflow for git and github. 2012/3/5 pbreit > Until we have stable and dev branches I'm not sure we need to do any of > this. And it still seems like the pace of change would make dev/stable > branches

Re: [web2py] Re: more tutorials?

2012-03-05 Thread Bruno Rocha
I teach a Python and web2py online course for begginers[1], I teach the course in Portuguese and now it is completing one year of existence, in this last year I've trained 156 people in 10 class groups, normally each group has 15-20 students and all the classes are recorded and available for future

Re: [web2py] Re: Last Day for Submissions! -- Web2py Application Exhibition Version 3.0

2012-03-05 Thread Mr admin
Very soon, I hope. I'm trying to contact the other judges. Mr.NetAdmin On Mon, Mar 5, 2012 at 12:26 PM, spiffytech wrote: > When will the winners be announced? > > > On Feb 14, 11:04 pm, NetAdmin wrote: > > Hello All, > > > > February 15 is the last day for submissions for the > Web2pyApplic

Re: [web2py] Re: more tutorials?

2012-03-05 Thread mikech
Bruno: This sounds great, I'd like to hear a sample in English when it's available. Mike On Monday, March 5, 2012 4:47:06 PM UTC-8, rochacbruno wrote: > > I teach a Python and web2py online course for begginers[1], I teach the > course in Portuguese and now it is completing one year of existenc

[web2py] Re: form.element() focus

2012-03-05 Thread Annet
Hi Alan, > I think there is not (not sure). But what if more than one field has > focus set to True? It's just this one field in this one form which is the exception to the rule, because it's an multiple table update form an organization's name_address_locality data. I'll use the workaround to s

[web2py] how to access auth.is_logged_in() from modules?

2012-03-05 Thread weheh
I'm finally migrating many, possibly all model functions to modules, where they belong. But one of my functions tests auth.is_logged_in(), which can not be found from within modules. Nor is it a current... I've done a bit of digging but haven't found the answer, yet. If someone knows how to do it,

Re: [web2py] how to access auth.is_logged_in() from modules?

2012-03-05 Thread Bruno Rocha
in model after all (in the last line of the last model) include. from gluon import current current.auth = auth so in module you will have access to current.auth. http://zerp.ly/rochacbruno Em 06/03/2012 03:40, "weheh" escreveu: > I'm finally migrating many, possibly all model functions to modu

[web2py] Fw: [security-77] Secure Coding (web app) Competition

2012-03-05 Thread Luther Goh Lu Feng
Fyi for web2py developers - Forwarded Message - > From: thomas lim > To: security...@meetup.com > Cc: > Sent: Tuesday, February 28, 2012 10:39 AM > Subject: [security-77] Secure Coding (web app) Competition > > Hi readers of this mailing list > > There will be a Secure Coding (Web Ap

[web2py] load functionality in menu

2012-03-05 Thread Annet
In a view I have the following code in the right column of the content: {{=LOAD('vcardadmin','index.load',ajax=True,target='component')}} The vcardadmin controller contains the following menu: response.admin_menu=[ ['Home',request.function=='index',URL('index')], ... ['Theme',request

[web2py] SQLFORM.smartgrid and auth_membership

2012-03-05 Thread Martin Weissenboeck
Hi, I habe some groups in auth_group with roles like "teacher", "student", "administrator" There are persons in auth_user with a membership to one or more of these groups. Now I want to show in a smartgrid only the "teacher"s sg = SQLFORM.smartgrid(db.auth_user, constraints=dict(auth_user=query)