This is more of a general python question but maybe someone here knows
if my idea will work or not. I want my function to tell me when it is
done running. Currently I return the stream so there is no obvious
way to run code after it returns a value. I am wondering if I do a
try: finally: stateme
27;stop',datetime'))
>
> def static():
> import datetime
> path = os.path.join(request.folder,'static','/'.join
> (request.args))
> db.mylog(filename=path,start=datetime.datetime.now())
> return response.stream(open(path,'rb')
Is there any way to log when files are downloaded from the static
directory of an app and see when they started downloading and when
they completed?
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googl
Argh!!!, Windows!!! It works fine on Redhat. There must be firewall
hijinks. Thanks for all of your help Massimo. Web2py is making
something that should have taken months seem frustrating because I
can't do it in a day. Fantastic code.
-jason
On Jan 20, 5:07 pm, jlegler wrote:
> H
Here is a question. When a file larger than 1MB is sent from the
static directory, is is streamed? If so can I look at the headers and
payload to determine what is different?
On Jan 20, 3:50 pm, jlegler wrote:
> I don't think it is a player issue. If I point my browser to the
&g
chment,
filename="' + filename + '"'
return response.stream(open(path),chunk_size=4096)
else:
redirect(URL(request.application,'default','index'))
On Jan 20, 3:18 pm, mdipierro wrote:
> I do not know. It is a player issue. web2py s
ierro wrote:
> The code below looks right to me. What is the problem exactly?
>
> Did you try access
>
> http:///app/controller/stream/[id]
>
> On Jan 20, 7:05 am, jlegler wrote:
>
> > I am building an app for work to demo some streaming functionality.
> > I
I am building an app for work to demo some streaming functionality.
I've built the entire client in web2py and need to stream some video.
I need a way to stream mp4 content without using a tool like XmooV to
do it (because PHP is not running on this server and it will be
incredibly difficult to get
If you take a look at this thread I posted an example of my
configuration that is working great with webfaction.
http://groups.google.com/group/web2py/browse_thread/thread/25d8ee282ed23af2/5f9dfff0b81ebd29?hl=en&lnk=gst&q=webfaction#5f9dfff0b81ebd29
--~--~-~--~~~---~--
Try running it like this:
python2.5 web2py -p 80
By default, webfaction runs python 2.4 so if you don't specify 2.5 you
may run into problems.
I had really good luck following instructions written by dhmorgan and
yarko in webfaction's forums. You can view it at
http://forum.webfaction.com/view
hecked'
> else: response.flash='not checked'
> return dict(form=form)
>
> On Feb 22, 9:58 pm, jlegler wrote:
>
> > If I have a custom form, I seem to always have the checkbox returning
> > the same result whether it is checked or not. Does anyone
If I have a custom form, I seem to always have the checkbox returning
the same result whether it is checked or not. Does anyone have any
examples on how to make the checkbox return different results
depending on whether it is checked or not? All I want to do is have
the checkbox represent whethe
earing on forms (except
> readonly forms). default and update set the default values when a
> record is created/updated.
>
> Hope this makes sense.
>
> Massimo
>
> On Feb 22, 1:10 pm, jlegler wrote:
>
> > T2 had a cool feature that would show when a table was updated
T2 had a cool feature that would show when a table was updated and by
whom as long as the appropriate fields existed in the table
(created_by_ip, created_on, created_by, created_signature,
modified_by_ip, modified_on, modified_by, modified_signature). Does
the new Crud class have any of that func
This is exactly how I feel. I started using web2py to do a very small
project at work and the project's scope has expanded dramatically
because I am able to do things so quickly with it. I really haven't
found a truly showstopping issue yet and when I do get hung up I post
on here and have a fix
= False.
>
> Massimo
>
> On Feb 17, 6:12 pm, jlegler wrote:
>
> > Actually, looking at the web2py manual, I shouldn't have to specify
> > migrate=False. If the table exists and corresponds to the definition,
> > it should do nothing. Anyone know why this is not th
Actually, looking at the web2py manual, I shouldn't have to specify
migrate=False. If the table exists and corresponds to the definition,
it should do nothing. Anyone know why this is not the case when using
postgresql?
-jason
On Feb 17, 4:09 pm, jlegler wrote:
> Oops, should have
ignore them?
-jason
On Feb 17, 4:03 pm, jlegler wrote:
> I've been developing a webapp against sqlite and in the process of
> moving it to postgresql for production I have run into some problems.
> This is the latest one:
>
> When using postgresql, web2py is complaining that
I've been developing a webapp against sqlite and in the process of
moving it to postgresql for production I have run into some problems.
This is the latest one:
When using postgresql, web2py is complaining that tables defined in my
model already exist.
For example, when I call:
auth.define_table
t; Massimo
>
> > On Feb 16, 11:50 am, jlegler wrote:
>
> > > Yea, It is still throwing the same error.
>
> > > IntegrityError: insert or update on table "auth_event" violates
> > > foreign key constraint "auth_event_user_id_fkey"
> > &
e
> it one more try.
>
> Massimo
>
> On Feb 16, 10:19 am, jlegler wrote:
>
> > Did you put this in the SVN trunk? If so it is still happening.
>
> > -jason
>
> > On Feb 15, 6:44 am, mdipierro wrote:
>
> > > Check if this is now fixed in trun
Did you put this in the SVN trunk? If so it is still happening.
-jason
On Feb 15, 6:44 am, mdipierro wrote:
> Check if this is now fixed in trunk.. in 5 minutes
>
> On Feb 14, 11:25 am, jlegler wrote:
>
> > Okay, thanks. I will see if I can find any side effects from doi
Actually, looking at this a bit closer, your second form is making a
call against db.recurso which changes your formkey and makes web2py
think you are tampering with the form when you try to submit the first
form. If I were you and wanted to make this really easy, I would make
sure I am running w
Do you have anything in the view or are you just using a generic
view?
On Feb 13, 12:41 pm, vamaq wrote:
> Hi everybody,
>
> I'm having a problem with a multiple form page. When I submit the
> first form (called form) I get the "user is tampering with form" error
> at the trace.
>
> The model is
Okay, thanks. I will see if I can find any side effects from doing
that. I'll also see if I can figure out why it behaves in sqlite and
if it behaves in mysql. Perhaps this is a good reason to not use
postgresql.
-Jason
On Feb 14, 1:21 am, Fran wrote:
> On Feb 14, 12:28 am, jlegle
I just moved an app into production using a postgresql database and am
having some trouble with Auth. All of the development was done
against sqlite and everything is working fine in there. In fact,
everything works fine against postgresql too except for registering
new users. For some reason w
.expected_result
%s' % request.args[0])
request.vars.affects_clients = eval('request.vars.affects_clients
%s' % request.args[0])
request.vars.regression = eval('request.vars.regression%s' %
request.args[0])
request.vars.test_case = eval('request.vars.test_case%s
I think I may have figured out a way to do it. Let me play around
with it a bit and I will get back to you. Thanks for all your help.
-Jason
On Jan 27, 9:00 am, jlegler wrote:
> I tried that last night which fixed the cosmetic issue of it always
> posting the update message to the t
x27;,
> 'client_acceptance_test'],'target');
>
> should be
>
> <div id="target{{=i.id}}"></div>
>
> <script>
> $('#myform{{=i.id}}').submit(function() {
> ajax('{{=URL(r=request,f='new_post'
lways submits the data on the top most form. I can't
figure out why for the life of me. Any ideas? I am sorry to waste
your time on this.
-jason
On Jan 26, 8:36 pm, mdipierro wrote:
> didn't you just do it? What is the problem. The code is hard to read.
>
> Massimo
>
> On J
The reason I am asking is because I want to generate a bunch of forms
based on data in the database and have them all show up on the screen
at one time and be updateable. I can get all of the forms to show up
on the screen and I can fill them out; however, they all make the
first one submit. Is
Thanks for the quick response.
On Jan 26, 6:13 am, mdipierro wrote:
> This is under testing. Will go away.
>
> Massimo
>
> On Jan 26, 1:02 am, jlegler wrote:
>
> > I am trying to use the new t2 functionality built into web2py and
> > having some odd proble
I am trying to use the new t2 functionality built into web2py and
having some odd problems. I am not sure why this is happening but
using crud.create results in a redirect to an invalid function. What
cases cause this redirect? This is the bit in utils that I don't
understand:
if self.settings
There are many ways to do it depending on what you want to do. Can
you give us an example of what you would like to do?
On Jan 24, 1:50 pm, Yannick wrote:
> Hello mate,
> Anyone knows how to customize the form ( Register, Login, etc...)
> return by T2 application Plug-in ?
>
> Thanks for your h
Okay, now I am getting the following error:
SyntaxError: user is tampering with form
I printed request.vars and I see an entry for every table in my
database with its own unique key. It looks as though I am just
renaming the key associated with that table and not creating a unique
one. This is
Markus, That is how I understood it as well; however, something I am
doing is making the formname change not take. I am under the
impression that if I am able to set the formname, I will be able to
keep the session since the formname will be unique. I can't get the
formname change to stick thoug
Ugh, sorry everyone. I didn't realize that it wasn't keeping track of
the thread for me so I deleted the original emails in my responses. I
will not do that in the future.
On Jan 23, 2:42 pm, jlegler wrote:
> The problem with this is I have to know how many forms I will be
>
The problem with this is I have to know how many forms I will be
sending back. I am dynamically generating them based on entries in
the database so I never get a chance to statically define them in the
controller.
--~--~-~--~~~---~--~~
You received this message b
I had tried that and thought that perhaps I was using it wrong. Here
is an example of it not working. I am probably doing something wrong
but I can't seem to find it. I am dubious of the code in my model now
so I have included it as well. I don't really understand how the
formkey is generated
I am creating a tool that has a custom built form on the top of a page
that, when submitted, creates an entry in the database and then
displays a new partially filled in custom built form in a list of
forms below. All of the partially filled in forms display and need to
be able to be filled out a
Hahah, Awesome! I knew it was going to be something really easy.
Thanks so much. I seriously love this framework. Every time I find
something that is challenging I find that it is only challenging
because I haven't thought about it the right way. Thanks so much.
Seriously, this framework is br
Okay everyone, I am completely new to web2py and have what I hope is a
simple question. I have been hung up for days trying to build a
custom form that, upon submittal, will reload the page it is on
including the REST value at the end of the URL. I am generating a
custom form in Python and passi
42 matches
Mail list logo