[web2py] Re: Downloaded file size differs from the original file size.

2012-04-12 Thread Changju
Yes, I just installed Apache + web2py and It worked perfectly. Thanks~:) On Friday, April 13, 2012 6:16:05 AM UTC+9, nick name wrote: > > On Wednesday, April 11, 2012 5:56:22 AM UTC-4, Changju wrote: >> >> I put a file on the static folder, let say 'testApp/static'. >> And I download the file on

[web2py] Re: how to change a field type from string to decimal?

2012-04-12 Thread pbreit
This might not work because I'm not sure changing from a string to decimal is straightforward (if the column was not empty). Per the docs, it may need a "using" clause: http://www.postgresql.org/docs/current/static/sql-altertable.html Alternatively, you could delete the Field from your model an

[web2py] Re: Default table schema for the Auth tables

2012-04-12 Thread Anthony
Look at the define_tables method of the Auth class in /gluon/tools.py: http://code.google.com/p/web2py/source/browse/gluon/tools.py#1299. I'm not sure there's a good way to remove individual fields, but if you don't want them, you can always set their readable and writable attributes to False,

[web2py] Re: Default table schema for the Auth tables

2012-04-12 Thread villas
One way is to look directly at the code in gluon/tools.py Under Class Auth try searching for define_table etc. I doubt that you would be able to safely remove fields though. On Thursday, 12 April 2012 23:23:21 UTC+1, cyan wrote: > > > Hi group, > > Is there anywhere I can find the default schema

Re: [web2py] Re: web2py: encrypt uploaded files

2012-04-12 Thread Derek
You put it on the 'accept' or else you make it a job in cron. On Thursday, April 12, 2012 2:35:36 PM UTC-7, naveed wrote: > > I wasn’t asking as how to encrypt the file itself, but how to > incorporate it in to web2py’s existing excellent form upload and download > system. Assuming that we hav

[web2py] Default table schema for the Auth tables

2012-04-12 Thread cyan
Hi group, Is there anywhere I can find the default schema for the tables involved in Auth provided by Web2py, namely, 'auth_user' 'auth_group' 'auth_membership' 'auth_permission' 'auth_event' They're described in the the manual but I would like to see the exact field definitions for each of t

RE: [web2py] Re: web2py: encrypt uploaded files

2012-04-12 Thread Alvaro Lizama
You should make a custom validator for encrypt files. -- Alvaro Lizama http://alvarolizama.net El jueves 12 de abril de 2012 a las 16:35, Naveed Ahmed escribió: > I wasn’t asking as how to encrypt the file itself, but how to incorporate it > in to web2py’s existing excellent form upload

Re: [web2py] Re: web2py: encrypt uploaded files

2012-04-12 Thread Naveed Ahmed
I wasn’t asking as how to encrypt the file itself, but how to incorporate it in to web2py’s existing excellent form upload and download system. Assuming that we have functions encrypt(file, password) and decrypt(file, password) which return the encrypted and decrypted file respectively. From:

[web2py] menu issues when no subitems

2012-04-12 Thread anonymouse
Hi, [FYI, my problem is SOLVED -- But I still wonder about this...] I have been using a menu with web2py since v1.8x (currently 1.98.2). I now have 3 different versions running on three different servers. PRODUCTION -- 1.98.2 -- menu is OK TEST - 1.99.3 -- menu is screwy DEV - 1.99.4 -- menu i

Re: [web2py] Re: Mimicking HTML5 pattern attribute for inputs

2012-04-12 Thread Anthony
> > The h5Validate does the trick for me. I can't get Webshims to work so that > wasn't a viable option. It is all-enclusive so it is a more ideal solution > than h5 but for some reason I have trouble making some js work with things > like web2py. > It should work. Perhaps you're loading it bef

Re: [web2py] Re: How to add an input field in SQLFORM.grid??

2012-04-12 Thread Richard Vézina
Hello Danel, May I see screenshot of what Massimo propose? I mean I would be really interrested in a bulk entry capability too. If it is already available I would know I was about to make a custom mechanism to allow user to add many result at the same time that would rely on Excel and validate_a

[web2py] Re: Downloaded file size differs from the original file size.

2012-04-12 Thread nick name
On Wednesday, April 11, 2012 5:56:22 AM UTC-4, Changju wrote: > > I put a file on the static folder, let say 'testApp/static'. > And I download the file on static folder, the downloaded file differs from > the original file in size. > Original file size is 15,227,904 and 15,096,832 for downloaded

[web2py] Re: How to add an input field in SQLFORM.grid??

2012-04-12 Thread greenpoise
Massimo, where do I change the INPUT size (length, width)? links = [lambda row: INPUT(_name='quantity', _class='integer', _value=1)] On Wednesday, 11 April 2012 18:34:16 UTC-7, Massimo Di Pierro wrote: > > yes and not and what I said needs clarification. > > grid = SQLFORM.grid(create=False

Re: [web2py] how to change a field type from string to decimal?

2012-04-12 Thread Carlos Costa
The database wont be recreated. And you could change the field name temporally. 2012/4/12 Carlos : > Hi, > > Is it possible (and how) to change a field type from string to decimal > without recreating the table?. > > There are no records in the table yet, but I would like to know if there's a > wa

[web2py] how to change a field type from string to decimal?

2012-04-12 Thread Carlos
Hi, Is it possible (and how) to change a field type from string to decimal without recreating the table?. There are no records in the table yet, but I would like to know if there's a way to accomplish this from web2py (without recreating the database). The error I get: column "xfield__tmp" i

RE: [web2py] Re: Mimicking HTML5 pattern attribute for inputs

2012-04-12 Thread Sean Samborski
The h5Validate does the trick for me. I can't get Webshims to work so that wasn't a viable option. It is all-enclusive so it is a more ideal solution than h5 but for some reason I have trouble making some js work with things like web2py. I've had trouble in the past with Drupal and AbleCommerce

[web2py] Re: Questions on the scheduler

2012-04-12 Thread Francisco G. T. Ribeiro
Thank you for your answer. I am not very interested in importing more dependencies even though I know those projects you mention are great (I really like Erlang..). Anyway you gave me an idea that could solve it. Implement a "messaging system" in web2py by keeping a table with those contents as

[web2py] Re: Python Argentina Conference 2012 - Massimo confirmed - Call for Sponsors

2012-04-12 Thread Massimo Di Pierro
Thank you Mariano. I am honored. On Thursday, 12 April 2012 10:42:28 UTC-5, Mariano Reingart wrote: > > FYI > > Massimo Di Pierro (creator of web2py) is our first confirmed invited > speaker: > > http://ar.pycon.org/2012?lang=en > > http://ar.pycon.org/2012/activity/speakers/#34 > > > We're looki

Re: [web2py] Re: bidirectional languages

2012-04-12 Thread Massimo Di Pierro
You have to use something like in CSS .rlt { direction:rtl; } .ltr { direction:ltr; } and use something like {{=T('text')}} and translate the direction as you translate the text. On Thursday, 12 April 2012 08:22:09 UTC-5, Kalpa Welivitigoda wrote: > > On Thu, Apr 12, 2012 at 5:56 PM, Massim

[web2py] Re: Questions on the scheduler

2012-04-12 Thread Wikus van de Merwe
If all what you need is to report th task progress, you could periodically write the amount of work done to db from within the task. Then query db asynchronously with ajax to show it to the user. This could be done by extending the "scheduler_run" table. I'm not sure if there is a way to stop a

[web2py] Python Argentina Conference 2012 - Massimo confirmed - Call for Sponsors

2012-04-12 Thread Mariano Reingart
FYI Massimo Di Pierro (creator of web2py) is our first confirmed invited speaker: http://ar.pycon.org/2012?lang=en http://ar.pycon.org/2012/activity/speakers/#34 We're looking for sponsors: http://ar.pycon.org/2012/sponsors/prospectus?lang=en http://ar.pycon.org/2012/static/docs/carta_sponso

[web2py] Re: Can't rebuild database files

2012-04-12 Thread Yarin
The current documentation is here: http://web2py.com/books/default/chapter/29/6#Fixing-broken-migrations in case anyone else wants to know. @Massimo- you should consider having a "warnings" or "rules of thumb" section in the book where things like this can be documented collectively. Example:

[web2py] Re: unordered list and pagination

2012-04-12 Thread Annet
Massimo, Thanks for helping me solve the problem. This: fields=(db.Organization.name , ) # <<< > the commma > ... doesn't work. It had to be: fields=[db.Organization.name ] > Kind regards, Annet.

Re: [web2py] Re: Query or Expression for excluding certain values from DAL selection on GAE

2012-04-12 Thread Sathvik Ponangi
Anthony is right, it works fine without the ~. As a temporary workaround I'm using: meta = db.posts.tags.contains(settings.meta_id) all=db(db.posts).select()#, limitby=(0, settings.delta) meta=db(meta).select() posts = [] i = 0 for post in all: if i==settings.delta: break if post in meta

[web2py] Re: Questions on the scheduler

2012-04-12 Thread blackthorne
Sorry to rehash this topic, this is critical to me and eventually to you. Scheduler in web2py works great. What I need is to access the workers asynchronously and invoke methods on it so that I can pause/resume/abort them and check on its level of progress. Any ideas on this? Thank you On Sat

Re: [web2py] Re: Add conditional sub-menu

2012-04-12 Thread Omi Chiba
Nice approach. I will try for my another project ! On Thursday, April 12, 2012 5:18:58 AM UTC-5, Javier wrote: > > I was working on a set menu from the database. It's simple and it can be > useful. > The model is simple, and has a condition to evaluate options when > generating the menu items. >

[web2py] Re: Add conditional sub-menu

2012-04-12 Thread Omi Chiba
Cliff, Thank you for sharing code but now I got a different error. Maybe it cannot understand sub_menu contains three parameters.. Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 205, in restricted exec ccode in environment File "C:\web2py\applications\home

[web2py] Re: Query or Expression for excluding certain values from DAL selection on GAE

2012-04-12 Thread Anthony
Actually, I think the problem is not with contains() but with the NOT operator (~) -- it doesn't work on GAE (technically, you can use it with a few operators, such as <, >, ==, because they can be negated by using the opposite operators). Massimo, note that the syntax error used there is missp

Re: [web2py] Re: Query or Expression for excluding certain values from DAL selection on GAE

2012-04-12 Thread Sathvik Ponangi
GAE DataStore - Web2Py 1.99.7 Stable On Thu, Apr 12, 2012 at 5:53 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > What database, what web2py version? > > > On Thursday, 12 April 2012 01:48:51 UTC-5, Sathvik Ponangi wrote: >> >> From >> http://stackoverflow.com/**q/10117143/937891

Re: [web2py] Re: bidirectional languages

2012-04-12 Thread Kalpa Welivitigoda
On Thu, Apr 12, 2012 at 5:56 PM, Massimo Di Pierro wrote: > Yes. You have to translate the CSS that determines the alignment as well. > My translation file is applications/eden/languages/ur.py (eden is my application name). There I have an untranslated string as "Today (Monday)" and in Urdu lang

Re: [web2py] Re: Scaling web2py

2012-04-12 Thread villas
> > > Thanks that will be helpful, I liked the idea of paths also. However if > you have 200,000 + nodes in a tree the paths might be coming hard to work > with. > > Yes, my tree was somewhat smaller! It seems to me that "with recursive" is the easiest method to manage this, although of cours

[web2py] Re: bidirectional languages

2012-04-12 Thread Massimo Di Pierro
Yes. You have to translate the CSS that determines the alignment as well. On Thursday, 12 April 2012 05:15:29 UTC-5, Kalpa Welivitigoda wrote: > > Hi, > > Does the translation feature of web2py support bidirectional languages? >

[web2py] Re: Query or Expression for excluding certain values from DAL selection on GAE

2012-04-12 Thread Massimo Di Pierro
What database, what web2py version? On Thursday, 12 April 2012 01:48:51 UTC-5, Sathvik Ponangi wrote: > > From http://stackoverflow.com/q/10117143/937891 > > I'm trying to exclude posts which have a tag named meta from my selection, > by: > > meta_id = db(db.tags.name == "meta").select().first().

[web2py] Re: Browser back button: Reloading database results

2012-04-12 Thread villas
My conclusion is that it is better to submit search forms with GET. Not only does it seem to avoid this problem, it allows users to bookmark searches. I create the search form with SQLFORM.factory and usually use keepvalues=True so that the user can keep his previous choice. I hope this is rel

[web2py] Re: OpenID, facebook, twitter, linkedin, etc etc

2012-04-12 Thread Roma Asnani
i am trying janrain and had created a model that contains this code. Refer from vimeo.com/21364178 building a minimalist facebook clone and deploying on google app engine using janrain. import os from gluon.contrib.login_methods.rpx_account import RPXAccount # we disable actions that will be pr

[web2py] plugin_fbconnect_button() of sample

2012-04-12 Thread shinriyo
Hi there Nice to meet you I downloaded "FacebookConnectExample" from http://www.web2py.com/appliances And deployed it on my web2py. The top page has a "{{=button}}" button. I touch the button, new page open and input my facebook information. And later, *new page* go to logged in page. I hope*

[web2py] unable to deploy web2py application on GAE

2012-04-12 Thread Monika Vashistha
I have successfully managed to run my web2py application on dev_appserver. However when I tried to deploy it on GAE using command on terminal : python2.5 appcfg.py update ../web2py , it is giving error : Error 404: --- begin server output --- This application does not exist (app_id=u'friends').

Re: [web2py] Re: Add conditional sub-menu

2012-04-12 Thread Javier Pepe
I was working on a set menu from the database. It's simple and it can be useful. The model is simple, and has a condition to evaluate options when generating the menu items. The evaluation was done using the function 'eval'. Attach model. To manage SQLFORM.grid use or what you like db.define_table

[web2py] bidirectional languages

2012-04-12 Thread Kalpa Welivitigoda
Hi, Does the translation feature of web2py support bidirectional languages?

Re: [web2py] Re: default value for upload Fields

2012-04-12 Thread hasan alnator
Massimo , still its now working , i did what you told me and it got me the name of the image in the upload folder but it didnt work

Re: [web2py] Adding a copy option to a SQLFORM.grid

2012-04-12 Thread Mike Veltman
ok I used this in the end :) links = [lambda row: A('Copy',_href=URL("formdb","copy_profile",args=[row.id]))] @auth.requires_login() def copy_profile(): record = db.lparprofile(request.args[0]) vals = {} for k,v in record.items(): if k in db.lparprofile.fields:

[web2py] References, uuid, postgresql and foreign keys

2012-04-12 Thread Johann Spies
When 'normal' web2py practice defines a field as a reference like this: Field('created_by', db.auth_user, default = auth.user_id, readable = False, writable = False) , postgresql does something like this: ALTER TABLE akb_articles ADD CONSTRAINT akb_articles_creat

[web2py] translation issue with right-to-left languages

2012-04-12 Thread Kalpa Welivitigoda
Hi, I am using Sahana-eden [1] which runs on web2py and I have a issue with right-to-left language (Arabic, Urdu) translations (Sahana-eden uses web2py translation feature). I change the language to Urdu in http://demo.eden.sahanafoundation.org/eden/(second from the bottom in the language men

Re: [web2py] Adding a copy option to a SQLFORM.grid

2012-04-12 Thread Mike Veltman
On 04/12/2012 01:08 PM, Mike Veltman wrote: Well I would like to have besides edit delete etc in my SQLFORM.grid also a copy option that copies the record and then gives me the edit so I can modify it. Anyone a idea how to do that ? Mike Aha I have to use links (RTFM) Does anybody have a ex

Re: [web2py] question about processing db entries in chunks

2012-04-12 Thread Johann Spies
On 12 April 2012 08:51, weheh wrote: > I need to limit my processing of db entries to chunks of, let's say, 100. > So I want to first get the data: > > data = db(db.mytable.flag == False).select(limitby=(0,100)) > > for d in data: > # do something > > Then I want to set mytable.flag to True a

Re: [web2py] Plugin Wiki, jqgrid, crud.create error

2012-04-12 Thread Johann Spies
On 12 April 2012 05:38, Simon Ashley wrote: > Just playing with the plugin wiki and jqgrid with a simple example below, but > it return an error: > > Not sure why, any ideas? > > > Did you create the table 'plant' ? I also played with this yesterday and it seems that this 'create' widget only c