This looks relevant:
http://groups.google.com/group/web2py/browse_thread/thread/fbc8d2ff40430d92/b1c6d74aead0a401?lnk=gstq=file+upload+service#b1c6d74aead0a401
Looks like CJ and I are on the same wavelength here as well:
http://groups.google.com/group/web2py/browse_thread/thread/67912959c7f021e1/9d3418deff7558b4?lnk=gstq=how+to+post+a+file#9d3418deff7558b4
So the underlying question is whether this has changed circa 2011 or
should I follow the threads?
And more links:
http://groups.google.com/group/web2py/browse_thread/thread/ab2cb938413e7be/23df7270902aa957?lnk=gstq=how+to+post+a+file+to+a+service#23df7270902aa957
Seems like things have changed over time. So question of what's the
latest approach seems OK. Basically, how to POST a file to a
Hi Massimo,
When uploadseparate is set to True, previously mentioned solution
will not work, at least not for me.
Although, Bruno gave us one suggestion, I would prefer to use explicit
image location rather than image ID.
To explain:
###model:
db.define_table(image,
...
Hello, this has been annoying me all day - any suggestions welcome.
I am receiving an IntegrityError from web2py when trying to insert a
record into a table named Foods. The table has a foreign key to
Recipes, but I would like to add a row without a recipe_id.
I receive this sql error:
class
I have encountered this too. Are there any suggestions/fixes to solve
this issue?
On Jun 2, 9:54 am, Oskari oskari.pe...@gmail.com wrote:
Yes I did. Dal seems to try to put 0 in database but MySQL rejects the
value, since there is no row with index 0. I think the proper way to
indicate None in
Also nothing happens
On 10 июл, 02:42, Anthony abasta...@gmail.com wrote:
What happens if you remove vars=request.vars from LOAD()?
On Jul 9, 11:52 am, LightOfMooN vladsale...@yandex.ru wrote:
ajax=True doesn't work too
I make it clear:
layout.html
Hi,
I'm thinking of using this mapreduce lib for GAE, however it expects one to
reference GAE entity_kinds. Is there a way to reference the underlying GAE
entity through DAL?
I've run into this problem in the past when trying to apply some GAE
specific functions such as cursors for paging.
Actually,
I just found solution for my app, again if somebody can provide more
portable solution that would be great?
a href={{=URL('app/static/image.file',listing.file[11:13],
listing.file)}} rel=prettyPhoto[gallery2]
img src={{=URL('app/static/image.file',listing.file[11:13],
Il giorno 08/lug/2011, alle ore 18.14, Francisco Costa ha scritto:
Hardo to say. 0.9.7 branch is now obsolete, and a lot of fix has been
added to signal framework in 0.9.8. If you want to manage timer reliably
you should use the latest tip (it is really the 0.9.8.2 release, i am only
waiting
We want to save a blob to datastore in GAE
not only save the name
is this the same as upload field
On Jul 9, 9:51 pm, Shark shark4...@gmail.com wrote:
Ok thank very much Anthony
On Jul 9, 4:32 pm, Anthony abasta...@gmail.com wrote: On Saturday, July 9,
2011 8:07:48 AM UTC-4, Shark wrote:
In web2py a Field(...,'upload') makes both a StringProperty and a
BlobProperty. The filename goes in one and the data in the other.
I think BlobProperty has a 10MB limitation but I am not sure. These
numbers change as GAE evolves.
Massimo
On Jul 10, 8:22 am, Shark shark4...@gmail.com wrote:
We
Thanks massimo for reply
but my question
will upload field work in GAE and will save the data in datastore or I
have to define field as anther type ?
example
b.define_table('person',
Field('image', 'upload'))
As it by default save data in upload folder
thanks in advance
On Jul 10, 5:18 pm,
looks to me like admin is posting data as a string, not something with a
timetuple() method. don't all form posts come to you as strings and would
need to be cast to other types before storing in the DB?
Shark,
the upload field will work (though you might have to pass the flag to tell
it to store the file in the DB). it's been a while since i have used that
on GAE.
if your uploaded file will be larger than 1MB (the current limit for blob
fields assuming the online docs here are correct
I noted alternate functioning of Web Shell on Mozilla Firefox 5 and Internet
Explorer 9 on a PC with Vista installed OS.
I currently use the last Version 1.97.1 (2011-06-26 19:25:44) of web2py.
Anyone noted the same problem ?
- Valter
Bingo - I'll start an issue over in google code submit the patch. Thanks
Anthony!
cheers. I'll look into it.
On 10 Jul 2011, at 17:30, howesc how...@umich.edu wrote:
looks to me like admin is posting data as a string, not something with a
timetuple() method. don't all form posts come to you as strings and would
need to be cast to other types before storing in the DB?
I think the web shell can be a little quirky, especially in IE on Windows. I
usually just use the Windows shell. To make it easy to quickly run a
particular app (and optionally run a specific controller), I have put a
'web2py shell.bat' file on my desktop with the following content:
@echo off
Thanks howesc for your help
On Jul 10, 6:36 pm, howesc how...@umich.edu wrote:
Shark,
the upload field will work (though you might have to pass the flag to tell
it to store the file in the DB). it's been a while since i have used that
on GAE.
if your uploaded file will be larger than 1MB
No problem. Glad it worked. Thanks for submitting the patch.
Anthony
On Sunday, July 10, 2011 1:26:06 PM UTC-4, Brian M wrote:
Bingo - I'll start an issue over in google code submit the patch. Thanks
Anthony!
Hello Everyone!
Is there a simple/efficient/secure way to temporarily redirect all requests
to a specific page?
(all requests except for those that define a few actions that are permitted
at that point in time)
The context:
- When user logs in, he needs to choose the version of the website
Hmm, I tried the code you provided below (with ajax=True as well as with
ajax=False/ajax_trap=True), and it worked fine for me (though I did have to
set auth.settings.login_next=URL('default','login2') -- otherwise, the
component redirects to the index page, which displays the entire index page
You could do the check in a model file -- all (non-conditional) model files
are executed on every request (before the requested controller action).
E.g.:
if not (session.version_selected or
request.function=='version_selection_page'):
redirect(URL('default','version_selection_page')
more thoughts:
could I do something like:
- define a shared global variable session.version
- = -1 initially, signifying no choice made
- ? use a callback that gets executed *before *the controller that
responds to the request
- if session.version -1:
let the
On Jul 10, 2011, at 12:48 PM, Luis Goncalves wrote:
more thoughts:
could I do something like:
define a shared global variable session.version
= -1 initially, signifying no choice made
? use a callback that gets executed before the controller that responds to
the request
if
Newbie to Web programmer here. Please be gentle.
I am trying to get my head around HTML helpers and see that they have
been discussed so much and so often in this group that (1) I can't
find what I'm looking for and (2) I am thinking there ought to be a
sticky someplace that talks about their
Awesome!!! Thanks!!! I will try it out!!!
Luis.
Do you think it will eventually become federated with a server we can
install like they did with google wave, or will it only run on their
servers?
I think it's mostly a matter of personal preference, but some people prefer
to use native HTML when it's in a view and the web2py helpers when it's in a
controller (or model). The helpers are also useful any time you need to do
any server side DOM parsing and manipulation (see
Pretty much the only helper I use in views is URL(). But I use helpers more
extensively in controllers.
Also note that you can put anthony's code in a controller outside a function
and it will run every time tha controller is called.
Are you saying you want to do this someplace other than in a model file? The
model file will be the first place where you'll be able to introduce any
application logic (prior to that it's just framework code getting executed).
On Sunday, July 10, 2011 3:48:47 PM UTC-4, Luis Goncalves wrote:
Hi,
shouldn't something lik this work? or maybe i'm missing something for
passing in a variable for a field name?
id=db.local_user.insert(dateTime=datetime.now())
for key in localUserDict.keys():
for field in db.local_user.fields:
if field==key:
34 matches
Mail list logo