The simplest way to add icon support is to define the SchevoIcon entity
Post by Patrick K. O'Brienfrom schevo.schema import *
schevo.schema.prep(locals())
_hidden = True
name = f.unicode()
data = f.image()
_key(name)
Thanks for the tip; no problem creating a new db with it. But as to
updating existing databases, maybe it is traceback time after all.
When I make the change suggested above to a existing schema (that
governs a pre-existing db with data in it) on executing "evo db evolve"
I get:
Schevo tracing is ON. See schevo.trace.__doc__ for more information.
Schevo 3.0-beta2 :: Database Activities :: Evolve Database
Opening the existing database...
Traceback (most recent call last):
File "C:\python24\scripts\evo-script.py", line 7, in ?
sys.exit(
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 32, in __call__
return self.main(arg0, args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 74, in main
return command()(*args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 32, in __call__
return self.main(arg0, args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 74, in main
return command()(*args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 32, in __call__
return self.main(arg0, args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\db_evolve.py", line 129, in main
db = schevo.database.open(db_filename, schema_source)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\database.py", line 59, in open
db._sync(schema_source, initialize)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\database.py", line 1180, in _sync
old_schema_module = self._import_from_source(
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\database.py", line 1094, in _import_from_source
schema_module = module.from_string(source, module_name)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\lib\module.py", line 37, in from_string
exec code in module.__dict__
File
"schevo-db-schema-0<C:\code\rebel\dependency\py\py-dist\py\code\source.py
:213>", line 11, in ?
ImportError: cannot import name SchevoIcon
On "evo db create", I get:
Schevo 3.0-beta2 :: Database Activities :: Create Database
Traceback (most recent call last):
File "C:\python24\scripts\evo-script.py", line 7, in ?
sys.exit(
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 32, in __call__
return self.main(arg0, args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 74, in main
return command()(*args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 32, in __call__
return self.main(arg0, args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 74, in main
return command()(*args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\command.py", line 32, in __call__
return self.main(arg0, args)
File
"c:\python24\lib\site-packages\schevo-3.0b2dev_r2053-py2.4-win32.egg\sche
vo\script\db_create.py", line 102, in main
schema_filename = os.path.join(schema_path, 'schema_001.py')
File "C:\Python24\lib\ntpath.py", line 90, in join
assert len(path) > 0
TypeError: len() of unsized object