for FORM you can do:
if form.accepts():
if request.vars.submit1: do_task1
elif request.vars.submit1: do_task2
elif request.vars.submit1: do_task3
or
if request.vars.submit1 and form.accepts(...): do_task1
if request.vars.submit2 and form.accepts(...
def form():
form=FORM(TABLE(""),
TR(" ",INPUT
(_name="submit1",_type="submit",_value="SUBMIT")),
TR(" ",INPUT
(_name="submit2",_type="submit",_value="SUBMIT")),
TR("",INPUT(_name="submit3",
_type="submit",_value="SUBMIT")),
TR(" ",INPUT(_name
Actually this does not happen with SQLFORM since it is smart enough to
figure out that the current record should be included when enforcing
IS_NOT_IN_DB(...).
In your case I see you are using a normal FORM instead of SQLFORM. In
this case the solution is
IS_NOT_IN_DB(db(db.users.id!=user_id),'us
Hi all,
I allow users to edit their account settings in a web application. One
of the fields is their email address. I put a constraint on the field
stating that it should never be empty, null and unique. I came across
the situation that a user might want to change her/his email address,
the prob
You can do
TAG.SPAN(...) instead of SPAN()
and TAG works for any TAG including user defined
TAG.OPTGROUP()
upper or lower case is the same.
Massimo
On Nov 23, 10:58 pm, mmstud <[EMAIL PROTECTED]> wrote:
> I need optgroup and caption elements on my forms, so i had to add them
> to htm
table.exposes is not a web2py attributes, but a T2 attribute.
If you do not use T2 you use SQLFORM(...fields=[])
If you use T2 you you do not call SQLFORM explicitly so you set the
fields using exposes.
T2 does SQLFORM(,fields=table.exposes)
On Nov 23, 10:52 pm, mmstud <[EMAIL
I need optgroup and caption elements on my forms, so i had to add them
to html.py, but wouldnt it be nice to have all standard elements
supported by web2py?
http://www.htmlhelp.com/reference/html40/alist.html
--~--~-~--~~~---~--~~
You received this message becaus
On Nov 24, 3:40 am, mdipierro <[EMAIL PROTECTED]> wrote:
> db.t2_person.exposes=['name','email','password'] ## add the fields you
> need.
What is the difference between exposes=[] and SQLFORM(fields=[]), btw?
>
> On Nov 23, 6:22 pm, Oscar <[EMAIL PROTECTED]> wrote:
>
> > Which is the best way of
I suggest always using this:
http://mdp.cti.depaul.edu/examples/default/download
Experienced users who want to help with tests should get the
development version.
Massimo
On Nov 23, 10:17 pm, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 23, 2008 at 8:56 PM, hoben <[EMAIL PROTECTE
This query
> db((db.table1.data == data) & (db.table2.table1_id ==
> db.table1.id)).delete()
involves two tables therefore it is well defined in a select (it is a
join) but not in a delete. You can only delete if a query involves a
single table.
Massimo
On Nov 23, 8:48 pm, Tari <[EMAIL PROTECT
On Sun, Nov 23, 2008 at 8:56 PM, hoben <[EMAIL PROTECTED]> wrote:
.
>
> Where can I get the latest version of web2py? The one I have was
> downloaded from here: http://mdp.cti.depaul.edu/examples/default/download
> ("source code"). Should I be using "latest development snapshot"?
>
The latest
Hi, I would really appreciate help with this one:
db((db.table1.data == data) & (db.table2.table1_id ==
db.table1.id)).delete()
This condition works quite OK in a select, but how can I delete these
rows? Instead deleting the appropriate rows from both tables, py gives
me an "Unable to determine
Thanks! The thing that convinced me to use web2py was a claim that the
support in the google group was extremely fast - apparently it's
true.
Where can I get the latest version of web2py? The one I have was
downloaded from here: http://mdp.cti.depaul.edu/examples/default/download
("source code").
Hi Hoben,
The error here is that ctypes is missing therefore uuid.uddi4 is not
working. This is probably because you are using python2.6 but
dev_appserver is supposed to run on Python2.5. I suggest you
reinstall 2.5 and the the google stuff.
I also noticed you are running an older version of we
db.t2_person.exposes=['name','email','password'] ## add the fields you
need.
On Nov 23, 6:22 pm, Oscar <[EMAIL PROTECTED]> wrote:
> Which is the best way of hide registration key field?
>
> Thank you!
>
> Oscar.
>
> On 24 nov, 11:34, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > Now I understand. Yo
I tried working through the Vimeo tutorial. Everything worked fine
until I tried to deploy locally with dev_appserver.py. It's giving me
"Internal error; Ticket issued: unrecoverable"
Here is the debug from the terminal. I'm just trying to figure out how
to get a basic web2py app deployed on GAE
Mind that will not work on GAE. GAE does not support Joins.
Massimo
On Nov 23, 6:21 pm, Oscar <[EMAIL PROTECTED]> wrote:
> Thank you!
>
> I will review these!
>
> Oscar.
>
> On 24 nov, 11:48, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > There is a section of the book on many-to-many. You can also
Which is the best way of hide registration key field?
Thank you!
Oscar.
On 24 nov, 11:34, mdipierro <[EMAIL PROTECTED]> wrote:
> Now I understand. You found a bug in t2! Thank you.
>
> The string length defaults to 32. A uuid is longer so those fields
> should have a length of 64.
> Works on
Thank you!
I will review these!
Oscar.
On 24 nov, 11:48, mdipierro <[EMAIL PROTECTED]> wrote:
> There is a section of the book on many-to-many. You can also look at
> the examples in the pyworks2008 talk (on the web site) If this does
> not answer the question I will rewrite the example you po
webfaction works with web2py. follow the instructions for cherrypy 3
Massimo
On Nov 23, 10:54 am, SystemicPlural <[EMAIL PROTECTED]> wrote:
> Thanks
>
> I've decided to go with Webfaction for now. only $11 a month and it is
> a better deal than my current service - which I am not happy with for
1) class="date" will do what you ask, same for 'time' and 'datetime'.
2) db.event.vandatum.requires=IS_DATE(T("%Y-%m-%d'))
then use the languages tab to create an en.py translation file (or en-
en.py) and translate "%Y-%m-%d" into "%d/%m/%Y"
3) totdatum==vandatum + dagen should be
totdatum=IS
Thanks
I've decided to go with Webfaction for now. only $11 a month and it is
a better deal than my current service - which I am not happy with for
service reasons. If it works out I'll move my other stuff there as
well.
Thanks for everyones help.
On Nov 23, 12:09 pm, Jonathan Benn <[EMAIL PROT
There is a section of the book on many-to-many. You can also look at
the examples in the pyworks2008 talk (on the web site) If this does
not answer the question I will rewrite the example you posted.
Massimo
On Nov 23, 10:33 am, Oscar <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How I can reproduce this
Sorry I missed the link:
http://blog.arbingersys.com/2008/04/google-app-engine-one-to-many-join.html
(one-to-many)
On 24 nov, 11:33, Oscar <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How I can reproduce this with Web2Py and T2:
>
> http://blog.arbingersys.com/2008/04/google-app-engine-better-many-to-.
Now I understand. You found a bug in t2! Thank you.
The string length defaults to 32. A uuid is longer so those fields
should have a length of 64.
Works on sqlite because sqlite ignores length.
You should not make the ristration key editable/visible in forms. it
is used for email verification of
Hi,
How I can reproduce this with Web2Py and T2:
http://blog.arbingersys.com/2008/04/google-app-engine-better-many-to-many.html
(many-to-many)
Or (one-to-many)
Regards.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
Hi Massimo,
with your change, nothing at all gets imported.
I can see that using StringIO.StringIO is more pythonic than my hack
but I'm at a loss as to why the table that worked before now doesn't get filled.
Daniel
On Sun, Nov 23, 2008 at 16:30, mdipierro <[EMAIL PROTECTED]> wrote:
>
> Can y
I am working on an event list, which is based on the following model:
db.define_table('event',
SQLField('bedrijf', db.bedrijf, notnull=True),
SQLField('event', length=50, notnull=True),
SQLField('vandatum', type='date', notnull=True,),
SQLField('totdatum', type='date', notnull=Tr
Ok,
Sorry, some times my english isn't uderstandable.
I explain again: I have a T2 project with t2_person table extended
with some fields, so this tables come by default with a field named
registration key, when I try to add a new record with this field not
exposed nor displayed the app returns
Can you try instead
import StringIO
db.yourtable.import_from_csv_file(StringIO.StringIO(your_csv_string))
and see what happens? Booleans should be T/F not 1/0.
Massimo
On Nov 23, 8:23 am, "Daniel Contag" <[EMAIL PROTECTED]> wrote:
> Hi everyone, some progress has been made... :)
>
> Adding thi
sorry. I do not understand the problem. Could you give us more
details.
Massimo
On Nov 22, 11:05 pm, Oscar <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I getting an error about registration at T2_Person table, validation
> says that string is so long ¿? I don't know why I'm getting this issue
> because
appadmin needs to be improved. Right now it expects a SQL string and
dumbly passes it to the DB. The string should be parsed and passed to
the DAL instead.
Massimo
On Nov 22, 10:08 pm, Jonathan Benn <[EMAIL PROTECTED]> wrote:
> Hi Massimo,
>
> On Nov 22, 10:15 am, mdipierro <[EMAIL PROTECTED]> w
Just return a dict of dicts -->
return dict(dict1={'one':1,'two':2},dict2={3:'three',4:'four'},
dict3={'hi':'mom'})
> Yes, I realized this is a python issue, and found my python manual
> telling me that I could combine several dicts in the return statement
> by making a tuple out of them, just
Hi everyone, some progress has been made... :)
Adding this to gql.py I am able to import tables that contain strings.
However I receive a type error when importing a table that has a
column of type boolean.
The code: contrib/gql.py
class SQLTable(SQLStorage):
[..]
def import_from_csv_string(se
Hi Systemic,
On Nov 22, 11:11 pm, SystemicPlural <[EMAIL PROTECTED]> wrote:
> Thinking about learning python for a new project as it looks
> v.interesting. (currently a .net and php developer)
> I am trying to workout what kind of requirements the deployment server
> will need. My current servi
Make that .import_from_csv_file ...
Sorry.
Daniel
On Sun, Nov 23, 2008 at 12:55, Daniel Contag <[EMAIL PROTECTED]> wrote:
> Hm, so it *should* work. Weird.
>
> This is the error when trying
>
> "
> try:
>from google.appengine.api import urlfetch
> except:
>pass
> else:
>url = "http:/
Hm, so it *should* work. Weird.
This is the error when trying
"
try:
from google.appengine.api import urlfetch
except:
pass
else:
url = "http://abc/db_hoersaal.csv";
result = urlfetch.fetch(url)
if result.status_code == 200:
db.table_one.import_from_csv_string(result.
37 matches
Mail list logo