The syntax is just regular python, what I've used is called a conditional expression <https://www.python.org/dev/peps/pep-0308/> which is python's version of the ternary operator.
It has the form: a if test else b Which is equivalent to this in many languages: test ? a : b; So what's happening here is that the value is None if there's no file, None evaluates to False when used as a boolean. So what the syntax actually means is, return the link if there's a value otherwise return "No Files Available", which coincidentally is exactly what you wanted. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

