Hear is PHP example (to show what is my wish to do):
in HTML:
html
body
form action=upload_file.php method=post
enctype=multipart/form-data
label for=fileFilename:/label
input type=file name=file id=file /
br /
input type=submit name=submit value=Submit /
/form
/body
/html
in PHP file
Ok. Will try it monday when I get back to work and have access to a computer
with web2py.
In my db.py I am importing:
from google.appengine.ext import db as google_db
But got the following error:
ImportError: No module named *google.appengine.ext*
I see in gaehandler.py there is *google.appengine.ext:*
from *google.appengine.ext* import webapp
from
What I have for now:
in view:
{{=form}}
{{=form_data}}
in controller:
import cgi
def upload():
form = FORM(Upload
file:,INPUT(_type='file',_name='myfile'),INPUT(_type='submit',_name='submit',_value='Submit'))
if form.accepts(request,session):
response.flash = 'form accepted'
hi,
is it possible for sqlform.grid and sqlform.smartgrid use the archive
table for record versioning?
i tried to use the sqlform.grid and sqlform.smartgrid with record
versioning but returned an error :
AttributeError: 'DIV' object has no attribute 'process'
my controller is :
def index():
Sure, you can code all that manually.
On Saturday, November 19, 2011 2:53:13 AM UTC-5, miroslavgojic wrote:
I reed all in online book about upload and forms...
Can I make my upload manually, something like: brows_file -
upload_to_some_folder.
What is happening after I submit button 'upload'
On Saturday, November 19, 2011 4:54:03 AM UTC-5, miroslavgojic wrote:
What I have for now:
in view:
{{=form}}
{{=form_data}}
No need for 'form_data' on the page (your controller doesn't return it
anyway).
in controller:
import cgi
def upload():
form = FORM(Upload
Can some one show me what the code would look like to accomplish the
following:
Create a drop down list for field A
that will be populated by field B
A.db.t_ab_recipient.f_distribution_name
B.db.t_ab_distribution.f_distributionname
Any help would be appreciated.
Since you won't know the record type until after the form is submitted, it
might be best to handle that with an onvalidation
function: http://web2py.com/book/default/chapter/07#onvalidation
Anthony
On Saturday, November 19, 2011 1:14:47 AM UTC-5, Jimmy Stewpot wrote:
Hello,
I am trying to
On Fri, 2011-11-18 at 20:02 -0800, Constantine Vasil wrote:
Why Eclipse debugger cannot stops at controllers?
I guess you have this problem because controllers never get imported,
but they are just execfile()'d, so the debugger doesn't even know that
code gets executed..
--
Samuele
You could do:
db.t_ab_recipient.f_distribution_name.requires = IS_IN_DB(db,
't_ab_distribution.f_distributionname')
See http://web2py.com/book/default/chapter/07#Database-Validators.
Instead, though, you might want to explicitly link the two tables:
db.define_table('t_ab_distribution',
controllers never get imported
What do you suggest to solve this? I mention when debugger comes
to controllers it compiles them and also every time when
a view is requested. That is not needed because GAE
compiles them before uploading to Google anyway.
Are there a way to switch of the
On Nov 19, 2011, at 12:56 AM, Constantine Vasil wrote:
In my db.py I am importing:
from google.appengine.ext import db as google_db
But got the following error:
ImportError: No module named google.appengine.ext
I see in gaehandler.py there is google.appengine.ext:
from
I have One form for multiple tables working very well locally, I can
include data and upload images normally on rocket server and sqlite.
my model
* Field(author, reference auth_user),
** Field(author_nickname, string),
**
On Sat, Nov 19, 2011 at 2:02 PM, Bruno Rocha rochacbr...@gmail.com wrote:
*if request.env.web2py_runtime_gae: *
this was a typo when writing the email, actually is
*if **NOT** request.env.web2py_runtime_gae:*
Hi All,
Is there some way of including virtualfields in the grid? It would be very
useful.
Thanks, David
No need for 'form_data'. When you upload the file, the field values are
stored in request.vars and then transferred into form.vars. The file upload
will be in form.vars.myfile, which will already be a cgi.FieldStorage()
object. So, form.vars.myfile.file will be the open file object, and
You might need to access the file before calling form.accepts (first you'll
have to check that form.vars.myfile exists). You can also access it via
request.vars.myfile (which won't change, even after form.accepts).
Anthony
On Saturday, November 19, 2011 11:41:02 AM UTC-5, miroslavgojic wrote:
The error is caused when file is not selected.
By default on first run form is empty (file is not selected), and form
must wait for selecting and submitting.
How access to file before calling form? What that mean?
Miroslav
On Nov 19, 5:52 pm, Anthony abasta...@gmail.com wrote:
You might need
I'm trying to figure out a way to simplify a series of SQL statements.
I have the following 2 tables
db.define_table('event_users',
Field('event', 'reference events'),
Field('user_name', 'reference auth_user'),
Field('goal', 'double'),
Field('last_entry', 'date'),
You can tell if the function is being called with a form submission by
checking for request.vars:
if request.vars:
print 'this is a form submission'
On Saturday, November 19, 2011 12:06:40 PM UTC-5, miroslavgojic wrote:
The error is caused when file is not selected.
By default on first
Thanks for all your answers. I have been quite busy these days, so I
only answer now.
Marin
On 18 nov, 17:10, Constantine Vasil thst...@gmail.com wrote:
+dlypka
*
*
I am developing web services for already 7 years (SOAP, REST, XML, etc.)
using .NET. At this time back in the beginning yes it
Hi,
Should we upgrade to Modernizr 2 ?.
http://www.modernizr.com/
Carlos
grid = SQLFORM.smartgrid(db.item, user_signature = False, oncreate =
auth.archive, onupdate=auth.archive)
oncreate may be optional, depending on whether the current record is
archived or the previous record. This has not been settled in web2py
but will be settled in the next few days.
On Nov
yes. will add later to trunk.
On Nov 19, 11:31 am, Carlos carlosgali...@gmail.com wrote:
Hi,
Should we upgrade to Modernizr 2 ?.
http://www.modernizr.com/
Carlos
Now I have in controller:
def upload():
form = FORM(Upload
file:,INPUT(_type='file',_name='myfile'),INPUT(_type='submit',_name='submit',_value='Submit'))
if request.vars:
if form.accepts(request,session):
my_file = request.vars.myfile.file
my_filename =
I'm using PyDev (latest) with debugging all the time, putting breakpoints
at the controller or inside the controller code just works for me. I'm
using Windows 7, Eclipse Helios with Aptana, no problems with earlier
Eclipse without Aptana)
I just start web2py.py inside Eclipse (right-click,
have you tried with GAE?
done
On Nov 19, 11:31 am, Carlos carlosgali...@gmail.com wrote:
Hi,
Should we upgrade to Modernizr 2 ?.
http://www.modernizr.com/
Carlos
Can I get full example for upload function?
This is maybe simply but after one day I don'n have any success.
- - Miroslav Gojic - -
On Sat, Nov 19, 2011 at 19:24, Anthony abasta...@gmail.com wrote:
Don't put the form.accepts inside the 'if request.vars' block -- it needs
to run even on form
FYI.
--
Chapter 4: Workflow
Error:
explained laster in this chapter
Correction:
explained later in this chapter
--
Chapter 4: Accessing the API from Python modules
Error:
way way for thme
Thanks Anthony,
I want to explicitly link the tables as you described above. Do I put
this code in in the DB_WIZARD.PY file?
If so how would I modify it. Everything I try produces an error on
save. Here are the two tables in question.
db.define_table('t_ab_distribution',
db.define_table('t_ab_recipient',
[snip]
change:
Field('f_distribution_name', type='string',
label=T('Distribution Name')),
to:
Field('f_distribution', db.t_ab_distribution,
label=T('Distribution Name')),
Note, your code wouldn't be producing any
Something like this:
def upload():
import os
uploadfolder=os.path.join(request.folder, 'uploads')
form = SQLFORM.factory(
Field('file', 'upload', uploadfolder=uploadfolder),
Field('new_name'))
if form.process().accepted:
hi,
did anyone know how to create header detail transaction form in one
page and input it on the database?
for example that i created in php :
=== form_input_tr_pr.php ===
form name=PRForm method=post enctype=multipart/form-data
action=input_tr_pr.php
table
tr
td
db.define_table('discussion',
Field('comment', 'text'))
def comment():
form = SQLFORM(db.discussion, _class='test1')
if form.process().accepted:
redirect(URL('comment_results'))
return dict(form=form)
def comment_results():
items =
sorry guys i hit enter to soon, disregard this question
On Sat, Nov 19, 2011 at 6:33 PM, chawk chrshawke...@gmail.com wrote:
db.define_table('discussion',
Field('comment', 'text'))
def comment():
form = SQLFORM(db.discussion, _class='test1')
if form.process().accepted:
New committer Scateu has joined. A new English version by default will
coming soon!
Thanks for you all guys's encouragement.
On Sep 22, 12:03 am, juanduke juan.fu...@gmail.com wrote:
+1 for fully english demo.
Will be appreciated :)
On Sat, 19 Nov 2011 20:16:39 -0800 (PST)
chinakr chin...@gmail.com wrote:
New committer Scateu has joined. A new English version by default will
coming soon!
Thanks for you all guys's encouragement.
Great news!
Does your CMS provide just an app to create web sites or there is some
kind of
39 matches
Mail list logo