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:
db(db
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:
> m
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.
Pretty much the only helper I use in views is URL(). But I use helpers more
extensively in controllers.
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
http://www.web2py
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?
Awesome!!! Thanks!!! I will try it out!!!
Luis.
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 prop
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 sessi
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 resp
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')
An
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
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
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!
Does the download() function handle the file paths properly?
def download():
"""
allows downloading of uploaded files
http:///[app]/default/download/[filename]
"""
return response.download(request,db)
Thanks howesc for your help
On Jul 10, 6:36 pm, howesc 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 (the curre
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
cheers. I'll look into it.
On 10 Jul 2011, at 17:30, howesc 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?
Bingo - I'll start an issue over in google code & submit the patch. Thanks
Anthony!
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
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
http:
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?
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, Mas
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 wrote:
> We want to save a blob
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 wrote:
> Ok thank very much Anthony
>
> On Jul 9, 4:32 pm, Anthony wrote:> On Saturday, July 9,
> 2011 8:07:48 AM UTC-4, Shark wrote:
>
> > > I need help in updating list
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
>>
Actually,
I just found solution for my app, again if somebody can provide more
portable solution that would be great?
Cheers
Ivica
On 10 July 2011 00:31, IK wrote:
> Hi Massimo,
>
> When "uploadseparate" is set to True, previously mentioned solution
> will not work, at least n
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.
Wou
Also nothing happens
On 10 июл, 02:42, Anthony wrote:
> What happens if you remove vars=request.vars from LOAD()?
>
> On Jul 9, 11:52 am, LightOfMooN wrote:
>
>
>
>
>
>
>
> > ajax=True doesn't work too
>
> > I make it clear:
> > layout.html
> > {{=LOAD('default','login2',vars=request.vars, ajax=
29 matches
Mail list logo