Looks good :-)
On Oct 11, 10:46 pm, billf <[EMAIL PROTECTED]> wrote:
> The shortest version I can get to work is:
>
> {{try:}}
> {{key,value=form.errors.iteritems().next()}}
> {{=key}} {{=value}}
> {{except:}}
> {{=message}}
> {{pass}}
>
> Bill
>
> On Oct 11, 11:54 pm, yarko <[EMAIL PROTECTED]> w
Hi Massimo,
If we buy from vitalsource right now, can we also get the pdf version
if/when its released later or do we have to pay for that again?
Thanks
Vihang
On Oct 10, 11:11 pm, "Phyo Arkar" <[EMAIL PROTECTED]> wrote:
> Yeah i know :D
> I am waiting to buy PDF version .
>
> If hes going to r
Ok. Thanks for your help.
On Oct 11, 7:04 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> I would define the form outside any action and and accept it in two
> different actions.
>
> Massimo
>
> On Oct 11, 5:53 pm, kev <[EMAIL PROTECTED]> wrote:
>
> > Ok take facebook for example.
>
> > When you visit
The shortest version I can get to work is:
{{try:}}
{{key,value=form.errors.iteritems().next()}}
{{=key}} {{=value}}
{{except:}}
{{=message}}
{{pass}}
Bill
On Oct 11, 11:54 pm, yarko <[EMAIL PROTECTED]> wrote:
> Here's what I get with your example:
>
> In [1]: list=[1,2,3,54]
>
> I
You can define them in a model, mind they are executed alphbetically,
or in a module and import them were needed.
Massimo
On Oct 11, 8:00 pm, pedro <[EMAIL PROTECTED]> wrote:
> I use this thread to make another question though is not directly
> related.
>
> Where should i define my validator cla
I use this thread to make another question though is not directly
related.
Where should i define my validator classes?
It would be nice to have them acessible both in the database
definition and in form falidation, just like the validators that come
with web2py
On 11 Okt, 23:41, "Phyo Arkar" <[E
I would define the form outside any action and and accept it in two
different actions.
Massimo
On Oct 11, 5:53 pm, kev <[EMAIL PROTECTED]> wrote:
> Ok take facebook for example.
>
> When you visit the site, see the form on the main page. Lets say the
> main page is rendered by default.py. Now yo
Here's what I get with your example:
In [1]: list=[1,2,3,54]
In [2]: for item in list:
...: print item
...: else:
...: print "no items"
...:
1
2
3
54
no items
---
Which I don' t think is what you want.
If you want the first item, then try this:
Ok take facebook for example.
When you visit the site, see the form on the main page. Lets say the
main page is rendered by default.py. Now you can also register not
only from main page but from facebook.com/r.php. Lets say i want
something like that so you can register from default.py and user/
How did the files get in there?
Not sure is this is what you are asking but you can do
os.listdir(os.jath.join(request.folder,'static'))
to get a listing.
there is a sample download action in appadmin.py
On Oct 11, 12:02 pm, "Phyo Arkar" <[EMAIL PROTECTED]> wrote:
> Dear Masimo;
>
> i am now m
Not sure I understand. There is one action that generates the form,
display the form, processes the form.
Upon success you redirect. Then the for is gone. Are you talking about
a second page of the form?
Massimo
On Oct 11, 12:10 pm, kev <[EMAIL PROTECTED]> wrote:
> Ok than how would i put a regi
1)def a function with a parameter
2)def __functioname__
On Sat, Oct 11, 2008 at 9:35 PM, pedro <[EMAIL PROTECTED]> wrote:
>
> That is the question. I guess placing them in an external module would
> do it, but it should be a way to define them in a controller and
> prevent them for being expos
In this case I wanted the following behaviour:
If there is at least one error message then display the first error
message else display the page message.
I just tested the template code without the {{break}} and the {{pass}}
at the end and it passes the syntax check - I just get all the error
me
That is the question. I guess placing them in an external module would
do it, but it should be a way to define them in a controller and
prevent them for being exposed... how does one achieve that?
--~--~-~--~~~---~--~~
You received this message because you are subsc
What is the "break" for?
Daniel
On Sat, Oct 11, 2008 at 22:50, billf <[EMAIL PROTECTED]> wrote:
>
> Adding a {{pass}} at the end doesn't make any difference.
>
> On Oct 11, 9:45 pm, billf <[EMAIL PROTECTED]> wrote:
>> New to python, I believe that the following is valid syntax:
>>
>> for item in
New to python, I believe that the following is valid syntax:
for item in list:
print item
else:
print 'no items in list'
When I put the following in a template I get a SyntaxError: invalid
syntax error with "else:" highlighted:
{{for key,value in form.errors.items():}}
{{=key}} {{=value}}
{
Adding a {{pass}} at the end doesn't make any difference.
On Oct 11, 9:45 pm, billf <[EMAIL PROTECTED]> wrote:
> New to python, I believe that the following is valid syntax:
>
> for item in list:
> print item
> else:
> print 'no items in list'
>
> When I put the following in a template I get
Ok than how would i put a register form in the default page (which is
controlled by the default.py), If register box is generated by user ->
register.py.
Thanks for the help,
Kevin
On Oct 11, 10:55 am, mdipierro <[EMAIL PROTECTED]> wrote:
> This is not the way the go. Submitting forms to a diffe
Dear Masimo;
i am now making a file download site.
Which store files in directories.
WHat i would like to do is to allow list indexing of files under directory.
How can i do it in web2py's cherrypy (non apache /mod_wsgi)
Or need to write a separate function?
Regards,
Phyo.
--~--~-~
Forget that.
The more I think about this the more I convince myself it would be
easier to just piggy back an onerror in route.py and not to implement
it as a WSGI plugin. Implementing it as wsgi would be difficult
because or routes_out. It would also require response parsing and that
would make w
The only part about what you said that I don't think I get is:
---
Ideally all of the processing of routes.py should be done in a
separate WSGI plugin module since there is no need to modify web2py to
implement this functionality. It would be sufficient to look for
web2py_error in the HTTP respon
Hi Ed,
It seems to me that the 'table' object is the small problem:
div=DIV()
for table_db in db.tables:
div.append(H2(table_db))
table=TABLE()
table.append(TR(*[TH(field) for field in
db[table_db].fields]))
for row in db().select(db[table_db].ALL):
This is not the way the go. Submitting forms to a different actions
other than the one generating the form is not a good software
engineering pattern. Forms should always self submit and redirect on
success. I suggest:
form=SQLFORM(...) ## no _action=
if form.accepts(request.vars):
redirect(
The code is using the table object for 2 different things:
1) a table name
2) a TABLE() object
Just give one of them another name, e.g.:
div=DIV()
for table in db.tables:
div.append(H2(table))
tbl=TABLE()
tbl.append(TR(*[TH(field) for field in db[table].fields]))
for row in db().selec
24 matches
Mail list logo