Re: [web2py] Re: w2p_tvseries: a new web2py app

2012-06-04 Thread Jason (spot) Brower
Intense man. Never needed a tool like that, but I know many that would find it very useful! On Mon, Jun 4, 2012 at 6:33 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > :-) > > > On Sunday, 3 June 2012 21:14:10 UTC-5, Niphlod wrote: >> >> whoa, you're right >> did I mention I'm

Re: [web2py] Re: Decoupling web2py templates

2012-06-04 Thread Massimo Di Pierro
You can do from gluon.template import render The render function is documented here: https://github.com/web2py/web2py/blob/master/gluon/template.py#L837 You can also use response.render(view,vars) instead of render(filename=view,context=vars) On Sunday, 3 June 2012 23:10:33 UTC-5, Alec Taylor

[web2py] Re: w2p_tvseries: a new web2py app

2012-06-04 Thread Alec Taylor
Thanks, I remember a friend wanting something like this for his anime a while back, I'll refer him to this :) Also especially like how neat you've made your forms, example from controllers/manage.py: form = SQLFORM.factory( Field('paths', default=vars['paths'], requires=IS_IN_SET(a

[web2py] Web2py execution blocking

2012-06-04 Thread Jan Rozhon
Hi group, I have encountered a problem when I try to call a controller which should return a JSON array of values from database. However in abou 1 of 5 cases this call stucks in "loading" phase (chrome animation in tab) and no response is received. Data is in database, every other controller is

Re: [web2py] Re: Decoupling web2py templates

2012-06-04 Thread Alec Taylor
Excellent, I think this is exactly what I've been searching for =D On Monday, June 4, 2012 5:16:26 PM UTC+10, Massimo Di Pierro wrote: > > You can do > > from gluon.template import render > > The render function is documented here: > https://github.com/web2py/web2py/blob/master/gluon/template.py#

Re: [web2py] query from sql to code in web2py

2012-06-04 Thread Johann Spies
On 2 June 2012 16:36, Annet wrote: > I have the following where close in a query: > > WHERE nodeid=283 and ((dayid=6 and starttime>'11:00:00')or(dayid>6)); > > In Postgresql this query outputs the right data. > > I translated this query into the following code in a function: > > rows=db((db.Timet

[web2py] I have trouble with the new scheduler and mysql: NotSupportedError

2012-06-04 Thread szimszon
http://code.google.com/p/web2py/issues/detail?id=833 After upgrading to Version 2.0.0 (2012-06-02 16:44:25) dev I got this if I start scheduler: Currently running 1 scheduler processes Processes started 2012-06-04 09:40:47,874 - root - DEBUG - defining tables (migrate=True) 2012-06-04 09:40:47,8

[web2py] Re: Web2py execution blocking

2012-06-04 Thread Jan Rozhon
Update, I have added several comments to this controller to see, where it gets block, the funny thing is that nothing really happens in those weird cases meaning that the controller is not executed at all, until I kill some spawned processes run by subprocess module, after that it appears, that

Re: [web2py] Re: Removing a row from a list

2012-06-04 Thread Johann Spies
On 1 June 2012 19:01, Anthony wrote: > You might consider building the links in the grid using the A() helper -- > if you specify the cid argument, it will trap the link and load it as a > component: > > A('Remove', _href=URL('default', 'grid.load', args=['delete', item.uuid]),cid > =request.cid)

[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError

2012-06-04 Thread szimszon
Here is a quick patch need testing: --- scheduler.py.old2012-06-02 14:44:26.0 +0200 +++ scheduler.py2012-06-04 10:46:35.557913663 +0200 @@ -417,13 +417,13 @@ return None grabbed = db(ts.assigned_worker_name==self.worker_name)\ (ts.status==ASSI

[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError

2012-06-04 Thread szimszon
Prev. patch wasn't good, here it is: --- scheduler.py.old2012-06-02 14:44:26.0 +0200 +++ scheduler.py2012-06-04 10:53:59.013899780 +0200 @@ -417,13 +417,13 @@ return None grabbed = db(ts.assigned_worker_name==self.worker_name)\ (ts.status==ASS

Re: [web2py] Django CRM + Commerce

2012-06-04 Thread Khalil KHAMLICHI
We would like to see such projects for web2py too :) On Sun, Jun 3, 2012 at 7:37 PM, pbreit wrote: > Good model. Mezzanine + Cartridge: > https://groups.google.com/forum/?fromgroups#!topic/django-users/5_VcKbID514 >

[web2py] Re: [web2py:8670] Re: Video Upload: Validate as video file, convert to flv, 'best practice' method?

2012-06-04 Thread Charles Tang
The temporary uploaded video file does not appear in uploads directory until the video is completely uploaded. So is it possible to access the temporary video file when the file is being uploading ?Thanks! On Friday, August 29, 2008 9:12:35 PM UTC+8, Massimo Di Pierro wrote: > > follow-up > > --

[web2py] Re: access an uploaded but not stored file?

2012-06-04 Thread Charles Tang
I have the same problem. How did you sovle it? On Saturday, January 15, 2011 8:56:41 AM UTC+8, Thomas Dall'Agnese wrote: > > Dear community, > > I have a form with an upload field that I use to upload a text file, > parse information from this file and store this information into the > database

[web2py] How to access temporary uploaded file?

2012-06-04 Thread Charles Tang
I am using a sqlform to upload a video file and want to encoding the video file while uploading. But I noticed that the upload file is not saved to uploads directory utill it is completely uploaded. Is there a temporary file and how can I access it ?Thanks.

[web2py] How to access temporary uploaded files and its filename?

2012-06-04 Thread Charles Tang
I want to encoding video files while uploading. The webpage should display the uploading process and encoding process. I use this snippet of codeto display the uploading progress and it works. But I found the video file wou

[web2py] poweredby broken?

2012-06-04 Thread stefaan
Ticket issued: poweredby/xxx.xxx.xx.x.2012-06-04.12-35-07.80f9cfdf-c405-4c8e-8229-3dca140cade2

[web2py] not enough arguments for format string

2012-06-04 Thread Hassan Alnatour
Dear ALL , I created a function to get a div and a button and a speed and then using jquery scroll down to that div , now the function looks like this : *def scrolldown(button_id,div_id,speed): ''' Scroll down to the end of any div using a button and a speed ''' return XML("$

Re: [web2py] poweredby broken?

2012-06-04 Thread Alec Taylor
Maybe show us the output? On Mon, Jun 4, 2012 at 9:37 PM, stefaan wrote: > Ticket > issued: poweredby/xxx.xxx.xx.x.2012-06-04.12-35-07.80f9cfdf-c405-4c8e-8229-3dca140cade2 >

[web2py] best practices for displaying a a subset of a tables columns?

2012-06-04 Thread bob
In the old days I would just create a database view on a subset of a table that I wanted to allow other developers to access (assuming read only), however I'm not sure if that's the best thing to do with web2py. I have a table that has: last_name first_name etc including some 'internal' colum

Re: [web2py] not enough arguments for format string

2012-06-04 Thread Martin Weissenboeck
Try: *return XML("$('%s').click(function(){$('html, body, %s').animate({scrollTop: $(document).height()}, %s); return false;});" % (**button_id,div_id,speed )* Regards, Martin 2012/6/4 Hassan Alnatour > Dear ALL , > > I created a function to get a div and a button and a speed and then using

[web2py] Re: poweredby broken?

2012-06-04 Thread Anthony
Yes, it does appear to be broken. Massimo? On Monday, June 4, 2012 7:37:20 AM UTC-4, stefaan wrote: > > Ticket issued: > poweredby/xxx.xxx.xx.x.2012-06-04.12-35-07.80f9cfdf-c405-4c8e-8229-3dca140cade2

[web2py] what do you think about waitress webserver

2012-06-04 Thread Vasile Ermicioi
hi, what do you think about waitress webserver? http://docs.pylonsproject.org/projects/waitress/en/latest/

[web2py] Re: How to access temporary uploaded file?

2012-06-04 Thread Anthony
I'm not sure how you might be able to process the file *while* it is uploading (i.e., process the bytes as they are received by the server), but if you can wait until the file is fully uploaded, you can access the uploaded file as a Python cgi.FieldStorage object: def upload(): if request.v

[web2py] Re: How to access temporary uploaded files and its filename?

2012-06-04 Thread Anthony
> > 2.Is it possible to get the uploaded video filename like > tablename.video.9f23071fdb975edd.34383034303039322e663476.f4v in the > uploads directory when the upload form is just submitted but not accepted? > No, the filename is determined at the time that the file is saved. Anthony

[web2py] Sending Emails to all my users in one time

2012-06-04 Thread Hassan Alnatour
Dear ALL , How can i send all the users i have in my auth_users an email at once ?\ regards,

[web2py] Re: HTML in context_dict for sending mails

2012-06-04 Thread Anthony
By default, the template engine escapes everything -- to avoid that, do: links = XML("user_a") See http://web2py.com/books/default/chapter/29/5#XML. Anthony On Monday, June 4, 2012 10:52:07 AM UTC-4, Sushant Taneja wrote: > > Hi All, > > I have a string var containing some HTML code > > links =

[web2py] Re: access an uploaded but not stored file?

2012-06-04 Thread Massimo Di Pierro
The file is in request.vars.file_field.file which is a read-only stream. You can shutil.copyfile it to a temporary folder. On Friday, 14 January 2011 18:56:41 UTC-6, Thomas Dall'Agnese wrote: > > Dear community, > > I have a form with an upload field that I use to upload a text file, > parse in

[web2py] Re: Web2py execution blocking

2012-06-04 Thread Massimo Di Pierro
Try replace output=rows with output=rows.as_list() Perhaps the rows are not json serializable. On Monday, 4 June 2012 02:20:39 UTC-5, Jan Rozhon wrote: > > Hi group, I have encountered a problem when I try to call a controller > which should return a JSON array of values from database. However in

[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError

2012-06-04 Thread Massimo Di Pierro
Thank you. Please upload the patch in a google code issue. Less changes of me forgetting or doing a mistake. ;-) On Monday, 4 June 2012 04:00:05 UTC-5, szimszon wrote: > > Prev. patch wasn't good, here it is: > > --- scheduler.py.old2012-06-02 14:44:26.0 +0200 > +++ scheduler.py

[web2py] Re: Web2py execution blocking

2012-06-04 Thread Jan Rozhon
Hi Massimo, thank you for your answer. Unfortunately, it didnt help. One thing I didn't mention and might be causing this trouble is, that I ask for several json values provided by similar controllers as I posted in my first post. Can the multitude ofjson requests cause this weird behaviour? In

Re: [web2py] best practices for displaying a a subset of a tables columns?

2012-06-04 Thread Richard Vézina
Johann answer here: https://groups.google.com/forum/?fromgroups#!topic/web2py/0VpTEoZ1tkc Anthony almost at the end of this thread : https://groups.google.com/forum/?fromgroups#!topic/web2py/b5VgstnvY3Y For the postgres views, you can define them as they were tables and set a restricted access p

[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError

2012-06-04 Thread szimszon
already there... http://code.google.com/p/web2py/issues/detail?id=833 2012. június 4., hétfő 17:39:52 UTC+2 időpontban Massimo Di Pierro a következőt írta: > > Thank you. Please upload the patch in a google code issue. Less changes of > me forgetting or doing a mistake. ;-) > > On Monday, 4 June

[web2py] Connecting to Firebird

2012-06-04 Thread pjag
Greetings, Getting up to speed on web2py, and am trying to use Firebird as my DB. When I start my web2py app, I get the following error message: Failure to connect, tried 5 times: Traceback (most recent call last): File "gluon/dal.py", line 5955, in __init__ File "gluon/dal.py", line 2449, i

[web2py] Using components via LOAD with conditional models is not working

2012-06-04 Thread anonymouse
Hi all, I'm having an issue trying to load a component that relies on conditionally loaded models. It appears that either the conditional model file is not executed/evaluated using the LOAD function. The following files are relevant to this issue: models/people/personnel.py controllers/people

[web2py] Re: Using components via LOAD with conditional models is not working

2012-06-04 Thread pbreit
Hmmm...I would have expected a LOAD(...ajax=True) to trigger conditional models properly. Not the answer you're looking for but I very strongly advise against premature optimization (ie, conditional models). On Monday, June 4, 2012 12:01:17 PM UTC-7, anonymouse wrote: > > Hi all, > > I'm havin

[web2py] Re: Using components via LOAD with conditional models is not working

2012-06-04 Thread anonymouse
Aw crap. And I thought I had tried that. setting ajax=True does indeed work... I'm guessing that it's because it creates a separate request whereas load without ajax uses the current value of request.controller to decide which models to execute. Anyway, problem solved. Thanks pbreit! Also, wh

[web2py] For all users using web2py editor on Firefox: solution to the "blurry" or "ghosty" text

2012-06-04 Thread sesenmaister
When using the web2py editor on firefox, text gets 1 pixel fatter, and makes the sensation of being blurry. I've got friends that seem comfortable with this little effect. But it disturbed me a lot, and therefore I went to Chrome, where the text appears just how it must. And I was some upset,

[web2py] Forms in multiple windows

2012-06-04 Thread Jim Karsten
Could we get a discussion going about web2py handling forms in multiple windows? A form may not submit as expected if a second window or tab is opened with the same form. Here are steps to reproduce the issue. 1. Create a page with a form. The form can be created by Crud or SQLFORM. 2. Open the

[web2py] For all users using web2py editor on Firefox: solution to the "blurry" or "ghosty" text

2012-06-04 Thread sesenmaister
When using the web2py editor on firefox, text gets 1 pixel fatter, and makes the sensation of being blurry. I've got friends that seem comfortable with this little effect. But it disturbed me a lot, and therefore I went to Chrome, where the text appears just how it must. And I was some upset

[web2py] Re: Web2py execution blocking

2012-06-04 Thread Massimo Di Pierro
I do not know what may be causing it, except that: - one ajax/json call is better than many - each call will lock the session for the use which means they are not executed concurrently, they are queued, unless you session._unlock(response). On Monday, 4 June 2012 11:02:23 UTC-5, Jan Rozhon wr

[web2py] Re: Connecting to Firebird

2012-06-04 Thread Massimo Di Pierro
You need to install this driver before you can use firebird from python: http://kinterbasdb.sourceforge.net/ On Monday, 4 June 2012 12:45:06 UTC-5, pjag wrote: > > Greetings, > > Getting up to speed on web2py, and am trying to use Firebird as my DB. > When I start my web2py app, I get the follo

Re: [web2py] Re: Web2py execution blocking

2012-06-04 Thread Michele Comitini
@Jan are you using sqlite? mic 2012/6/4 Massimo Di Pierro : > I do not know what may be causing it, except that: > > - one ajax/json call is better than many > - each call will lock the session for the use which means they are not > executed concurrently, they are queued, unless you > session._

[web2py] Re: For all users using web2py editor on Firefox: solution to the "blurry" or "ghosty" text

2012-06-04 Thread Anthony
There's a new editor in trunk -- not sure if it's in stable yet. Perhaps the new editor won't have this problem in Firefox. Anthony On Monday, June 4, 2012 3:36:55 PM UTC-4, sesenmaister wrote: > > When using the web2py editor on firefox, text gets 1 pixel fatter, and > makes the sensation of

[web2py] Re: best practices for displaying a a subset of a tables columns?

2012-06-04 Thread pbreit
I might not quite understand the question but wouldn't readable/writable work? On Monday, June 4, 2012 5:56:40 AM UTC-7, bob wrote: > > > In the old days I would just create a database view on a subset of a table > that I wanted to allow other developers to access (assuming read only), > howe

[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError

2012-06-04 Thread Niphlod
patched and ready for new testing.. Thank you for your patience szimszon Niphlod

[web2py] Re: Web2py execution blocking

2012-06-04 Thread Jan Rozhon
Ok, I have redesigned the page so that there is only one json call every 5 seconds instead of 3. It looks better, 4 from 4 trials were ok . Previously I have never achieved 3 consecutive successful trials, so there is an improvement, but I am not certain that the problem is really gone. I will

Re: [web2py] Re: best practices for displaying a a subset of a tables columns?

2012-06-04 Thread Richard Vézina
Yes it works, but I think lambda: has_membership is much better approach as pointed by Anthony as more fast since the lambda is only hit when you really want to access the records... Richard On Mon, Jun 4, 2012 at 4:00 PM, pbreit wrote: > I might not quite understand the question but wouldn't r

Re: [web2py] Re: Web2py execution blocking

2012-06-04 Thread Jan Rozhon
Yea, it is sqlite db. May it cause the trouble? Thanks Jan. Dne pondělí, 4. června 2012 21:53:20 UTC+2 mcm napsal(a): > > @Jan > > are you using sqlite? > > mic > > > 2012/6/4 Massimo Di Pierro : > > I do not know what may be causing it, except that: > > > > - one ajax/json call is better th

[web2py] Re: Using components via LOAD with conditional models is not working

2012-06-04 Thread pbreit
Some have gone so far to say "premature optimization is the root of all evil". I'm not quite in that camp but I do believe optimizations can and should generally wait. And for exact the reason exhibited here: they can make simple things complicated and hard to troubleshoot/fix. I think the "loa

[web2py] Re: Sending Emails to all my users in one time

2012-06-04 Thread pbreit
Maybe: emails = db(db.auth_user.id>0).select(db.auth_user.email).as_list() mail.send(bcc=emails, subject='Subject', message='Message.') On Monday, June 4, 2012 8:03:58 AM UTC-7, Hassan Alnatour wrote: > > Dear ALL , > > How can i send all the users i have in my auth_users an email at once ?\ >

[web2py] Re: what do you think about waitress webserver

2012-06-04 Thread pbreit
Ordinarily I would not think much of it but it actually looks interesting considering it is pure Python, supposedly production ready and "very acceptable performance". On Monday, June 4, 2012 7:03:11 AM UTC-7, Vasile Ermicioi wrote: > > hi, > what do you think about waitress webserver? > > htt

[web2py] Re: Using components via LOAD with conditional models is not working

2012-06-04 Thread Anthony
> > Aw crap. And I thought I had tried that. > > setting ajax=True does indeed work... I'm guessing that it's because it > creates a separate request whereas load without ajax uses the current value > of request.controller to decide which models to execute. > You're on the right track, but tha

[web2py] Re: what do you think about waitress webserver

2012-06-04 Thread Anthony
No SSL, though. On Monday, June 4, 2012 4:12:16 PM UTC-4, pbreit wrote: > > Ordinarily I would not think much of it but it actually looks interesting > considering it is pure Python, supposedly production ready and "very > acceptable performance". > > > On Monday, June 4, 2012 7:03:11 AM UTC-7,

[web2py] Re: Sending Emails to all my users in one time

2012-06-04 Thread Anthony
> > emails = db(db.auth_user.id>0).select(db.auth_user.email).as_list() > .as_list() gives you a list of dictionaries. Instead, maybe: emails = [r.email for r in db().select(db.auth_user.email)] Anthony

[web2py] Re: Connecting to Firebird

2012-06-04 Thread pjag
Massimo, Thanks for the reply I've already installed kinterbasdb, as I mentioned in my original message. I can access Firebird with kinterbasdb in a simple Python script. However, web2py doesn't see it. Correct me if I'm wrong, because I've barely scratched the surface with the web2py docum

[web2py] Re: Forms in multiple windows

2012-06-04 Thread Anthony
> > Massimo pointed out a flaw in my solution in that it would create an > ever-growing number of session variables and would be vulnerable to a DoS > attack. > Maybe by default it could cycle through a small number of formnames (e.g., _formname = _formname + '_1', etc.). So, for any given base

[web2py] Re: Connecting to Firebird

2012-06-04 Thread Massimo Di Pierro
Sorry I misunderstood. My guess is that you have different python version. make sure you run web2py from source and you use the python version where you installed kinterbasdb. On Monday, 4 June 2012 15:27:29 UTC-5, pjag wrote: > > Massimo, > > Thanks for the reply I've already installed kinter

[web2py] Re: Forms in multiple windows

2012-06-04 Thread Massimo Di Pierro
Yes, this may work. On Monday, 4 June 2012 15:36:34 UTC-5, Anthony wrote: > > Massimo pointed out a flaw in my solution in that it would create an >> ever-growing number of session variables and would be vulnerable to a DoS >> attack. >> > > Maybe by default it could cycle through a small number

[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError

2012-06-04 Thread szimszon
Thank you! 2012. június 4., hétfő 22:00:54 UTC+2 időpontban Niphlod a következőt írta: > > patched and ready for new testing.. > Thank you for your patience szimszon > > Niphlod >

Re: [web2py] MailCaptcha

2012-06-04 Thread szimszon
There is now a honeypot address handling to put sender directly in to blacklist. 1. somebody send you an email from someb...@domain.com 2. postfix ask MailCaptcha what to do - if the recipient address is not in the protected list do nothing special - else if the sender is i

[web2py] Re: HTML in context_dict for sending mails

2012-06-04 Thread howesc
are you sending the string as the HTML part of the email: send(to=customer.email, subject="Plain text subject", message=(text_message, html_message) both my messages are from response.render (and neither sent through XML()). cfh On Monday, June 4, 2012 7:52:0

[web2py] Re: what do you think about waitress webserver

2012-06-04 Thread pbreit
Well that's a problem and supports my initial intuition. I'm not sure how it can be considered "production-ready" without SSL. On Monday, June 4, 2012 1:21:10 PM UTC-7, Anthony wrote: > > No SSL, though. > > On Monday, June 4, 2012 4:12:16 PM UTC-4, pbreit wrote: >> >> Ordinarily I would not thi

[web2py] Error when inserting SQLCustomType

2012-06-04 Thread Alexander Shashkevych
Hi, I got strange error when tried to use SQLCustomType. I'm trying to create custom type which will handle unicode<->utf8 conversions. Since DB stores in utf8, but my app uses unicode, so I tried to create custom type which handles such conversions. Here is my code: db = DAL("sqlite:tmp

[web2py] SQLFORM for keyed tables

2012-06-04 Thread obad hemaily
I work with postgresql database. I have a keyed table, how can I insert at table with SQLFORM

[web2py] SQLFORM for keyed table

2012-06-04 Thread obad hemaily
Can I insert data with SQLFORM at keyed table the table in postgresql db the table created with web2py

Re: [web2py] Re: Trouble migrating databases

2012-06-04 Thread Ovidio Marinho
Waiting for news about the problem.        Ovidio Marinho Falcao Neto                 Web Developer              ovidio...@gmail.com           ovidiomari...@itjp.net.br                  ITJP - itjp.net.br                83   8826 9088 - Oi                83   9334 0266 - Claro                  

[web2py] Re: DAL list:integer and postgresql integer array type

2012-06-04 Thread Lewis
Done. Thanks.

[web2py] Re: Error when inserting SQLCustomType

2012-06-04 Thread Massimo Di Pierro
This is not allowed Field('text', type=utext, default=""), 'text' cannot be a field name. On Monday, 4 June 2012 16:54:46 UTC-5, Alexander Shashkevych wrote: > > > Hi, > > I got strange error when tried to use SQLCustomType. I'm trying to create > custom type which will handle unicode<->utf8 c

[web2py] Re: what do you think about waitress webserver

2012-06-04 Thread Massimo Di Pierro
I still think rocket is the best (speed and design compromise) but I am not sure Tim is till maintaining it. If rocket is no longer maintained we should revert to cherrypy. It supports ssl and has proved its worth. On Monday, 4 June 2012 18:17:57 UTC-5, pbreit wrote: > > Well that's a problem a

Re: [web2py] Re: DAL list:integer and postgresql integer array type

2012-06-04 Thread Bruno Rocha
Cant we have a custom field for this? Field.PostgresIntegerList("name") http://zerp.ly/rochacbruno Em 02/06/2012 00:26, "Massimo Di Pierro" escreveu: > The search by content should be faster using native postgresql array type. > Everything else should be the same. We could change it and should

[web2py] Re: How to access temporary uploaded file?

2012-06-04 Thread Charles Tang
Maybe I should do it on cgi level? On Monday, June 4, 2012 10:05:23 PM UTC+8, Anthony wrote: > > I'm not sure how you might be able to process the file *while* it is > uploading (i.e., process the bytes as they are received by the server), but > if you can wait until the file is fully uploaded,

[web2py] Re: access an uploaded but not stored file?

2012-06-04 Thread Charles Tang
Can the request.vars.file_fileid.file be accessed before the video is completely uploaded? On Monday, June 4, 2012 11:36:35 PM UTC+8, Massimo Di Pierro wrote: > > The file is in request.vars.file_field.file which is a read-only stream. > You can shutil.copyfile it to a temporary folder. > > On F

[web2py] Re: access an uploaded but not stored file?

2012-06-04 Thread Charles Tang
I have test request.vars.file_field.file, it can only be accesssed after the whole file is uploaded.Should I do it at a lower level? On Tuesday, June 5, 2012 11:41:28 AM UTC+8, Charles Tang wrote: > > Can the request.vars.file_fileid.file be accessed before the video is > completely uploaded? >

[web2py] Re: access an uploaded but not stored file?

2012-06-04 Thread Massimo Di Pierro
In gluon main there is this code: request.body = copystream_progress(request) ### stores request body if (request.body and request.env.request_method in ('POST', 'PUT', 'BOTH')): dpost = cgi.FieldStorage(fp=request.body,environ=environ,keep_blank_values=1) request.body.seek(

[web2py] Re: Error when inserting SQLCustomType

2012-06-04 Thread Alexander Shashkevych
I tried another field name, but result the same. I think dal has incomplete handling of custom types. I analyzed dal code and found that constructed query for my example was: INSERT INTO posts(content,html,title) VALUES (\xd0\x94\xd0\xb2\xd0\xb0,\xd0\xa2\xd1\x80\xd0\xb8,\xd0\x9e\xd0\xb4\xd0\xb8

Re: [web2py] SQLFORM for keyed table

2012-06-04 Thread Johann Spies
On 4 June 2012 21:21, obad hemaily wrote: > > Can I insert data with SQLFORM at keyed table > the table in postgresql db > the table created with web2py > Yes :) Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)