Minor error in the trunk, I think. I only noticed because I
did a fresh clone on a new machine.
WARNING:root:OpenSSL libraries unavailable. SSL is OFF
WARNING:root:WEB2PY CRON: cron.master not found at
/home/jbauer/web2py/applications/admin/cron/cron.master. Trying to
re-create.
WARNING:root:WEB2PY CRON Call returned code 1:
web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2010
Version 1.74.5 (2009-12-30 15:44:00)
Database drivers available: SQLite3
Traceback (most recent call last):
File "web2py.py", line 20, in <module>
gluon.widget.start(cron=True)
File "/home/jbauer/web2py/gluon/widget.py", line 743, in start
import_models=options.import_models, startfile=options.run)
File "/home/jbauer/web2py/gluon/shell.py", line 167, in run
execfile(startfile, _env)
File "applications/admin/cron/expire_sessions.py", line 5, in <module>
for file in os.listdir(path):
OSError: [Errno 2] No such file or directory: 'applications/admin/sessions'
changeset: 95:451c84611bbc
-Jeff
On 01/10/2010 09:38 AM, mdipierro wrote:
There are two new features in trunk. One will probably stay, the other
I do not know:
1) Before you could do
db.define_table('person',Field('name'),format='%(name)s')
db.define_table('dog',Field('name'),Field('owner',db.dog))
now you can also have things like
format=lambda person: person.name.capitalize()
or any other function of a person to represent it.
2) You can have
db.dog.owner.requires=IS_IN_DB(db,db.person,'%(names)s',
_and=IS_NOT_IN_DB
(db,db.dog.owner))
The novelty is in the _and.
The problem is that the exclusion is only used in validation, not when
creating the dropdown for IS_IN_DB. The reason is not is that it would
require looking two tables (the referee and the refrences). This could
be done with a JOIN in RDBs but it could not be done efficiently in
NoDBs
Any advice is appreciated.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.