[web2py] Re: No module named google.appengine.api

2010-07-02 Thread Richard
did you mean to say the source distribution? On Jul 2, 11:04 pm, mdipierro wrote: > Make sure you use the binary distribution of web2py and you start > web2py using > > dev_appserver web2py > > or the AppEngineLauncher > > On 2 Lug, 07:40, ShaluT wrote: > > > Hi, > > > I am learning web2py with

[web2py] Re: Admin app (or much of it) can work on appengine

2010-07-02 Thread Richard
would it make sense to have a separate admin app for GAE with tickets, appadmin, and whatever else works? Otherwise I imagine admin will get messy. On Jul 3, 2:36 am, JimK wrote: > After a few minor modifications, I was able to get the Admin app as > well as the appadmin controllers to work on a

[web2py] Re: No module named google.appengine.api

2010-07-02 Thread ShaluT
Started working: basically I changed the folder name from web2py to myapp. Just for a try I renamed it back to web2py... now GAE api's are accessible. On Jul 3, 8:40 am, ShaluT wrote: > I am using the source version of web2py. I think that the binary > version does not contain app.yaml and may n

[web2py] Re: No module named google.appengine.api

2010-07-02 Thread ShaluT
I am using the source version of web2py. I think that the binary version does not contain app.yaml and may not be tuned for GAE out of the box. comments? I am starting web2py using: dev_appserver.py myapp On Jul 2, 6:04 pm, mdipierro wrote: > Make sure you use the binary distribution o

[web2py] Re: Upload to Static folder? Serve File without streaming?

2010-07-02 Thread ron_m
It reads the entire file into memory, then writes it out, not good for files large enough to consume a significant fraction of system memory. On Jul 2, 6:48 pm, weheh wrote: > Massimo, just for my personal edification, why won't > open(os.path.join(...,'wb').write(...read()) be suitable for writi

[web2py] Re: Admin app (or much of it) can work on appengine

2010-07-02 Thread Scott
That would be fantastic!! If you need help, I'd be happy to lend a hand...

[web2py] Re: Upload to Static folder? Serve File without streaming?

2010-07-02 Thread Scott
With regards to storing the file, can you still use regex to validate the filename if you choose to utilize this direct upload method? I'm working on a project where a requirement is to store the files as-is on the filesystem as they will be utilized by other programs. On Jul 2, 8:27 pm, mdipierr

[web2py] Re: Upload to Static folder? Serve File without streaming?

2010-07-02 Thread weheh
Massimo, just for my personal edification, why won't open(os.path.join(...,'wb').write(...read()) be suitable for writing large files? What's a large file, anyway? On Jul 2, 8:27 pm, mdipierro wrote: > No. For large files use this instead: > > def index(): > > form=FORM((INPUT(_type='file',_name

[web2py] Re: Upload to Static folder? Serve File without streaming?

2010-07-02 Thread mdipierro
No. For large files use this instead: def index(): form=FORM((INPUT(_type='file',_name='myfile'),INPUT(_type='submit')) if form.accepts(request.vars,session): shutil.copyfileobj(form.myfile.file,open(os.path.join(request.folder,'static','filename.txt'),'wb')) response.flash='up

[web2py] Re: local_import

2010-07-02 Thread Jose
Now works! Thanks

Re: [web2py] Re: Upload to Static folder? Serve File without streaming?

2010-07-02 Thread Phyo Arkar
Thanks a lot! this code can also write Large Files right? On Fri, Jul 2, 2010 at 11:48 PM, mdipierro wrote: > > def index(): > > form=FORM((INPUT(_type='file',_name='myfile'),INPUT(_type='submit')) > if form.accepts(request.vars,session): > > > open(os.path.join(request.folder,'static','file

[web2py] Re: json extension not getting parsed

2010-07-02 Thread mdipierro
You have two options: 1) do the serializaion explicitely in the controller from gluon.serializers import json 2) use routes to map the urls. Something like routes_in=[('/app/$resource.json','/app/default/action.json/ $resource')] On 2 Lug, 18:39, sethford wrote: > Yeah I realized that's how

[web2py] Re: Upload to Static folder? Serve File without streaming?

2010-07-02 Thread mdipierro
def index(): form=FORM((INPUT(_type='file',_name='myfile'),INPUT(_type='submit')) if form.accepts(request.vars,session): open(os.path.join(request.folder,'static','filename.txt'),'wb').write(form.myfile.file.read()) response.flash='uploaded' return dict(form=form) but you

[web2py] Re: local_import

2010-07-02 Thread mdipierro
I think I fixed it. Please try again. Also check whether reload works or not. On 2 Lug, 18:26, Jose wrote: > In the modules directory of my application I have mymodule.py > > When run from the controller: > mymodule = local_import ('mymodule', reload = True) > > this produces no error, but when I

[web2py] Upload to Static folder? Serve File without streaming?

2010-07-02 Thread Phyo Arkar
Anyway to Upload directly to Static Folder (none SQLForm, none DB) And Serve file without streaming and going through Controller?

[web2py] Re: json extension not getting parsed

2010-07-02 Thread sethford
Yeah I realized that's how web2py works, I was under the impression that the extension always came after the args and directly before any variables. I tried changing the parser and realized I was going to get into all sorts of trouble with how urls are interpreted. I'm realizing more and more that

[web2py] Re: local_import

2010-07-02 Thread Jose
In the modules directory of my application I have mymodule.py When run from the controller: mymodule = local_import ('mymodule', reload = True) this produces no error, but when I access the functions or classes of the module, myobject = mymodule.MyClass(...) it fails: AttributeError: 'module'

Re: [web2py] Re: elFinder-web2py , Filemanager for Web2py!

2010-07-02 Thread Phyo Arkar
Another thing , how can i serve file, to be able to download directly out of web2py's application folder? Is it allowed? I guess not. On Fri, Jul 2, 2010 at 11:08 PM, Phyo Arkar wrote: > Mass > > Thanks a lot. we will need your help if you free. > > While converting from CGI (elfinder is with cgi

Re: [web2py] Re: elFinder-web2py , Filemanager for Web2py!

2010-07-02 Thread Phyo Arkar
Mass Thanks a lot. we will need your help if you free. While converting from CGI (elfinder is with cgilib) to web2py , some problems i have currently are : - Uploads and Download (how should i make it use web2py version of upload and downloads ?) On Fri, Jul 2, 2010 at 10:53 PM, mdipierro wrot

[web2py] Re: json extension not getting parsed

2010-07-02 Thread mdipierro
Make sure you use /app/controller/action.json/arg0/arg1/arg2 and not /app/controller/action/arg0/arg1/arg2.json On 2 Lug, 13:49, sethford wrote: > So I'm making an app that will be communicating with an android app in > a RESTful way using json. For example the app has many todo lists > which

[web2py] Re: elFinder-web2py , Filemanager for Web2py!

2010-07-02 Thread mdipierro
Thank you Troex and everybody on this thread for all your help on this thread. I am now busy with something else but I would like to have a elfinder based version of web2py admin by the end of the summer. Massimo On 1 Lug, 20:26, Troex Nevelin wrote: > I have some progress that should make your

[web2py] Re: local_import

2010-07-02 Thread mdipierro
Please tell us more. I do not understand. On 2 Lug, 12:58, Jose wrote: > Sorry, I did not put what the problem. I saw in the log of changes > that had something new with Imports and thought I had to do with it. > > The problem is that no matter the form directly. This started to > happen with the

[web2py] Re: Admin app (or much of it) can work on appengine

2010-07-02 Thread mdipierro
Since you worked on this already. If you can submit a patch I would love to take it. Massimo On 2 Lug, 11:36, JimK wrote: > After a few minor modifications, I was able to get the Admin app as > well as the appadmin controllers to work on appengine.  Admin is only > accessible to Appengine users

[web2py] Re: storing data between controllers

2010-07-02 Thread mdipierro
This technically not possible because there may not a persistent process on the server between two http requests in the same session. It is normal in fact in a production environment to have multiple processes, each multiple threads. The web severs turns them on and off freely. The only way the con

[web2py] Re: how to change the value of a field that is writable=False for crud.update form

2010-07-02 Thread mdipierro
You can change the value of fields that are not writable. You have to set db.table.field.default=... to set the value on creation and db.table.field.update=... to set the value on update. On 2 Lug, 09:31, selecta wrote: > this is a question > I thought I would be able to change a value of a fiel

[web2py] Re: generating a table

2010-07-02 Thread mdipierro
SQLField is just an alias for Field. The 2ed edition of the manual (2009) should only use Field. On 2 Lug, 09:00, elfuego1 wrote: > Is it really? > I want to make sure because that's the syntax in the manual for > creating fields in MySql database. > > On 2 Lip, 14:08, mdipierro wrote: > > > P

[web2py] Re: GAE / parents / ancestors in Web2py?

2010-07-02 Thread howesc
http://groups.google.com/group/web2py/browse_thread/thread/58d0d754d354c90f On Jul 2, 10:01 am, NickFranceschina wrote: > anybody? > > On Jun 29, 10:03 pm, NickFranceschina > wrote: > > > I've been reading and googling and searching... but not sure what the > > latest, up-to-date information is

[web2py] json extension not getting parsed

2010-07-02 Thread sethford
So I'm making an app that will be communicating with an android app in a RESTful way using json. For example the app has many todo lists which are retrieved with a url such as app/todo/lists/9.json (for list 9). For some reason when the request is parsed it doesn't recognize the .json as an extensi

Re: [web2py] Re: elFinder-web2py , Filemanager for Web2py!

2010-07-02 Thread Phyo Arkar
Thats very good. I am checking out now. On Fri, Jul 2, 2010 at 1:26 AM, Troex Nevelin wrote: > I have some progress that should make your life easier. > Have a look at this revision > > http://elrte.ru/redmine/projects/elfinder/repository/revisions/cc41850e7543640a268464a47c079b3da129709f > espec

[web2py] Re: web2py freezing

2010-07-02 Thread Candid
Can anyone shed light on this question: Also, am I missing something or rocket should close the connections if request is taking longer than 10 seconds (default timeout)? So if I put time.sleep(20) in my controller it should times out? That's not what's happening - the controller waits all those 2

[web2py] Re: local_import

2010-07-02 Thread Jose
Sorry, I did not put what the problem. I saw in the log of changes that had something new with Imports and thought I had to do with it. The problem is that no matter the form directly. This started to happen with the changes to the trunk between yesterday and today. Jose

[web2py] Re: local_import

2010-07-02 Thread NetAdmin
What type of errors or messages do you get? On Jul 2, 11:52 am, Jose wrote: > I have problems with local_import in the latest version of the trunk. > > Jose

[web2py] Re: GAE / parents / ancestors in Web2py?

2010-07-02 Thread NickFranceschina
anybody? On Jun 29, 10:03 pm, NickFranceschina wrote: > I've been reading and googling and searching... but not sure what the > latest, up-to-date information is on this: > > in GAE "parents" and "references" are two different things.  when you > create an object in GAE you can, on insert, assign

[web2py] Wing IDE / GAE / breakpoints not getting hit for "exec" code

2010-07-02 Thread NickFranceschina
I've been using WingIDE pro for a while... love it... followed advice to get it setup to work with Web2py and runs fine if I launch debugger through web2py.py ... but if I launch it through dev_appserver.py then the server runs and the app works and the breakpoints are hit for all code except for t

[web2py] local_import

2010-07-02 Thread Jose
I have problems with local_import in the latest version of the trunk. Jose

[web2py] Admin app (or much of it) can work on appengine

2010-07-02 Thread JimK
After a few minor modifications, I was able to get the Admin app as well as the appadmin controllers to work on appengine. Admin is only accessible to Appengine users that are allowed to contribute to your project (appengine app administrator), tickets stored in Big Table are viewable as well as t

[web2py] storing data between controllers

2010-07-02 Thread Jacques van der Merwe
greetings all, i have a question regarding storing data between controllers. i located similar posts regarding this, where the solution was to use the Session object to store data. the problem i'm experiencing however is that i need to store multiple objects, that are thread locked. this a problem

[web2py] Re: how to change the value of a field that is writable=False for crud.update form

2010-07-02 Thread selecta
this is a question I thought I would be able to change a value of a field that is not writable for the user if this is not possible please consider this as a suggestion On Jul 2, 3:03 pm, mdipierro wrote: > is this a question or a suggestion? ;-) > > On 2 Lug, 07:20, selecta wrote: > > > > > I w

[web2py] Re: generating a table

2010-07-02 Thread elfuego1
Is it really? I want to make sure because that's the syntax in the manual for creating fields in MySql database. On 2 Lip, 14:08, mdipierro wrote: > P.S. Please use Field, SQLFIeld is deprecated. > > On 2 Lug, 06:47, Rick wrote: > > > > > Hi, > > > I want to generate a table like this: > > >  

[web2py] Re: web2py freezing

2010-07-02 Thread mdipierro
please upgrade to 1.79.2 and see if you still get the problem. Massimo On 2 Lug, 03:52, Rowdy wrote: > > Greetings, > > I have a web2py application running in 1.76.5 (from source, and haven't > had the chance to test the app in a more recent version of web2py). > > The server is running vanill

[web2py] Re: dynamic database schema based on wsdl

2010-07-02 Thread mdipierro
for every table in db, the schema is in databases/bla bla bla.table it is a pickle file so it should be easy to read and generate wsdl. On 2 Lug, 08:18, Alexandre Andrade wrote: > Its possible make a script to conect, compare and write the new schema. > > Its better mantain this schema separated

Re: [web2py] dynamic database schema based on wsdl

2010-07-02 Thread Alexandre Andrade
Its possible make a script to conect, compare and write the new schema. Its better mantain this schema separated of db.py, in a file db_wsdl.py, to make it easier. 2010/7/2 winti > Hello, > is there a simple way to keep a web2py database table schema > synchronized with a wsdl document consum

[web2py] Re: No module named google.appengine.api

2010-07-02 Thread mdipierro
Make sure you use the binary distribution of web2py and you start web2py using dev_appserver web2py or the AppEngineLauncher On 2 Lug, 07:40, ShaluT wrote: > Hi, > > I am learning web2py with goal to deploy app to the GAE. > > Problem I am facing: >   On executing the following in default.py(co

[web2py] Re: how to change the value of a field that is writable=False for crud.update form

2010-07-02 Thread mdipierro
is this a question or a suggestion? ;-) On 2 Lug, 07:20, selecta wrote: > I want to change the value of a field that is writable=False of a form > that was created with crud.update > > def edit(): >     table, record = getTableRecord(request) >     if record: >         #this will show the right c

[web2py] No module named google.appengine.api

2010-07-02 Thread ShaluT
Hi, I am learning web2py with goal to deploy app to the GAE. Problem I am facing: On executing the following in default.py(controller) import google.appengine.api I am getting errors locally: XYZ/applications/welcome/controllers/default.py", line 19, in import go

[web2py] Re: Debian Packaging

2010-07-02 Thread Mark Breedveld
Thanks, i'm currently busy on a class diagram and a technical report to make the application clear. Because it's quite complex, but possible. But in the mean while, I would like to get a list of currently used configurations. Like this. web2py + apache wsgi + postgreSQL (textual configuration) web

[web2py] Re: web2py freezing

2010-07-02 Thread Candid
> Every now and again there is a "BUG: unable to handle kernel paging > request at virtual address b79b3000", always in the web2py Python > process, and web2py more or less hangs. Where do you see this error message? On Jul 2, 4:52 am, Rowdy wrote: > Candid wrote: > > I am using web2py in my org

[web2py] how to change the value of a field that is writable=False for crud.update form

2010-07-02 Thread selecta
I want to change the value of a field that is writable=False of a form that was created with crud.update def edit(): table, record = getTableRecord(request) if record: #this will show the right content but will not be stored in db record.created_on = request.now rec

[web2py] Re: generating a table

2010-07-02 Thread mdipierro
P.S. Please use Field, SQLFIeld is deprecated. On 2 Lug, 06:47, Rick wrote: > Hi, > > I want to generate a table like this: > >         db.define_table(objects[i], >                 SQLField(locus), >                 SQLField(before) >                 SQLField(after) >                 SQLField(na

[web2py] Re: generating a table

2010-07-02 Thread mdipierro
I would do this objects = ['substance', 'process', 'condition'] linksubobjects = ['locus', 'before', 'after'] unlinksubobjects = ['name', 'main_name'] for object in objects: fields=[Field(item) for item in link

[web2py] Re: Doctests keep getting stuck [solved]

2010-07-02 Thread mdipierro
Thanks for letting us know. On Jul 2, 6:02 am, Kerem Eryılmaz wrote: > Solved. It turns out the tests failed iff I included a specific xmlrpc > function which streams xml. It contained the line: > > response.headers['Content-Type'] = 'application/xml' > > which made the test page fail expecting t

[web2py] generating a table

2010-07-02 Thread Rick
Hi, I want to generate a table like this: db.define_table(objects[i], SQLField(locus), SQLField(before) SQLField(after) SQLField(name) SQLField(main_name) ...with a code similar to this : obj

[web2py] Re: crud.archive edit history question

2010-07-02 Thread selecta
no I have to correct myself, order of edits can be reconstructed by the id of the archived records On Jul 2, 1:40 pm, selecta wrote: > I tried it and this is NOT how it works > the current_record Field always points to the latest version > thus you can do > > current_record_version = db(getattr(d

[web2py] Re: crud.archive edit history question

2010-07-02 Thread selecta
I tried it and this is NOT how it works the current_record Field always points to the latest version thus you can do current_record_version = db(getattr(db,table_info.sql_name +"_archive").current_record==current_record.id).count() and saving created_on for every version is essential since otherw

[web2py] Re: Doctests keep getting stuck

2010-07-02 Thread Kerem Eryılmaz
Correction: since what is returned by _TEST is html and not well-formed xml --> since what is returned to _TEST is html and not well-formed xml On Jul 2, 2:02 pm, Kerem Eryılmaz wrote: > Solved. It turns out the tests failed iff I included a specific xmlrpc > function which streams xml. It conta

[web2py] Re: Doctests keep getting stuck

2010-07-02 Thread Kerem Eryılmaz
Solved. It turns out the tests failed iff I included a specific xmlrpc function which streams xml. It contained the line: response.headers['Content-Type'] = 'application/xml' which made the test page fail expecting to see html; since what is returned by _TEST is html and not well-formed xml which

[web2py] Re: Password verification - how to?

2010-07-02 Thread elfuego1
Thank you for your speedy help!!! On 2 Lip, 12:13, mdipierro wrote: > you can do for example (assuming trunk) > > form.element(_name=='password').insert(INPUT(_name='password2',requires=IS_­EQUAL_TO(request.vars.password))) > > if you do not use trunk instead of IS_EQUAL_TO(request.vars.passwor

[web2py] Re: Password verification - how to?

2010-07-02 Thread mdipierro
you can do for example (assuming trunk) form.element(_name=='password').insert(INPUT(_name='password2',requires=IS_EQUAL_TO(request.vars.password))) if you do not use trunk instead of IS_EQUAL_TO(request.vars.password) you can use IS_EXPR('value=%s' % repr(request.vars.password)) On 2 Lug, 04:5

[web2py] Re: crud.archive edit history question

2010-07-02 Thread mdipierro
Looks good. This assumes you you created the table_name+'_archive' according to crud.archive. On 2 Lug, 04:09, selecta wrote: > How do I display the edit history? > > For example I want to preserve the original creator and see who edited > it. How I understand this right now I would add the foll

[web2py] Re: web2py freezing

2010-07-02 Thread mdipierro
Do you see any issue with memory usage? On 2 Lug, 03:52, Rowdy wrote: > Candid wrote: > > I am using web2py in my organization for internal applications. One of > > the applications uses dedicated instance of web2py (v1.78.1) running > > on dedicated ubuntu server. It connects to our SQL Server 2

[web2py] Re: upload bug in filename

2010-07-02 Thread mdipierro
Can you try replace dest_file = open(pathfilename, 'wb') with try: dest_file = open(pathfilename, 'wb') except: logging.error(str(traceback.format_exc())) On 2 Lug, 03:22, Swell wrote: > Hi I may hae found something > > if i look at line 2688 in gluon/sql.py i can see in the function > store:

[web2py] Password verification - how to?

2010-07-02 Thread elfuego1
Since I am customizing my registration form, can you tell me what to do to have password verification functionality? I don’t know how to implement it in my form. I have password input field in the form and corresponding field in my database. Do I have to add additional field for password2 and someh

[web2py] crud.archive edit history question

2010-07-02 Thread selecta
How do I display the edit history? For example I want to preserve the original creator and see who edited it. How I understand this right now I would add the following fields to each table that is archived Field('created_by',default=auth.user_id,update=auth.user_id,writable=False), Field('edited_

[web2py] dynamic database schema based on wsdl

2010-07-02 Thread winti
Hello, is there a simple way to keep a web2py database table schema synchronized with a wsdl document consumed with the SOAPpy library ? Stefan

[web2py] Re: web2py freezing

2010-07-02 Thread Rowdy
Candid wrote: I am using web2py in my organization for internal applications. One of the applications uses dedicated instance of web2py (v1.78.1) running on dedicated ubuntu server. It connects to our SQL Server 2005 database via freetds. It runs with the following parameters: python web2py.py -

[web2py] Re: upload bug in filename

2010-07-02 Thread Swell
Hi I may hae found something if i look at line 2688 in gluon/sql.py i can see in the function store: newfilename = newfilename[:200] + '.' + extension but so far so good it doesn t break anything to truncate the filename. later in the function ( line 2699) i see pathfilename = os.path.join(path,

[web2py] Re: folder default

2010-07-02 Thread mdipierro
This URL(r=request, f='index') is a shortcut. It is ok to refer to another action within the same controller but it not ook to refer to an action in a different controller. The most general way is URL(r=request, c='controller_name', f='index') or URL(request.application,'controller_name','i

[web2py] sqlite db connection bug

2010-07-02 Thread Praneeth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, This might not be a major bug, but one might hit it during development. Having pool_size with a sqlite with the same URI in 2 or more different web2py applications causes web2py to reuse the connection of the app that is opened first. How