Hi Pylons people,
I'm trying to test the possibility to develop a web application in
Pylons and I must handle the permission at row level of my db.
I did think to use AuthKit but I'm forced to use the UsersFromDatabase
mode.
I did try to test the funcionality on following the tutorial relative
to QuickWiki in the Authentication and Authorization (PylonsBook) but
I don't be aple to pass the
paster setup-app development.ini
The first problem was the definition of 'meta' and 'ctx'. For meta I
suppose that there was e change in QuickWiki because MetaData() is
assigned to a 'metadata' variable. Then i add the line
meta = metadata
and for ctx insert 2 lines in QuickWiki model
from pylons.database import create_engine, session_context
...
ctx = session_context()
I know session_context is deprecated but I find no other way.
Then I stop at the same point with:
"""
[EMAIL PROTECTED]:~# paster setup-app test.ini
Running setup_config() from quickwiki.websetup
/usr/lib/python2.5/site-packages/QuickWiki-0.1.5-py2.5.egg/quickwiki/
model/__init__.py:10: DeprecationWarning: pylons.database is
deprecated, and will be removed from a future version of Pylons.
SQLAlchemy 0.3.x users are recommended to migrate to SAContext (http://
cheeseshop.python.org/pypi/SAContext) for similar functionality
from pylons.database import create_engine, session_context
/usr/lib/python2.5/site-packages/Pylons-0.9.6.1-py2.5.egg/pylons/
database.py:142: SADeprecationWarning: SessionContext is deprecated.
Use scoped_session().
scopefunc=app_scope)
Traceback (most recent call last):
File "/usr/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.3.6', 'console_scripts', 'paster')
()
File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/
paste/script/command.py", line 78, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/
paste/script/command.py", line 117, in invoke
exit_code = runner.run(args)
File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/
paste/script/appinstall.py", line 68, in run
return super(AbstractInstallCommand, self).run(new_args)
File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/
paste/script/command.py", line 212, in run
result = self.command()
File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/
paste/script/appinstall.py", line 456, in command
self, config_file, section,
self.sysconfig_install_vars(installer))
File "/usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/
paste/script/appinstall.py", line 592, in setup_config
mod.setup_config(command, filename, section, vars)
File "/usr/lib/python2.5/site-packages/QuickWiki-0.1.5-py2.5.egg/
quickwiki/websetup.py", line 20, in setup_config
import quickwiki.model as model
File "/usr/lib/python2.5/site-packages/QuickWiki-0.1.5-py2.5.egg/
quickwiki/model/__init__.py", line 27, in <module>
ctx = session_context()
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/
sqlalchemy/orm/scoping.py", line 44, in __call__
return self.registry()
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.1-py2.5.egg/
sqlalchemy/util.py", line 785, in __call__
return self.registry.setdefault(key, self.createfunc())
File "/usr/lib/python2.5/site-packages/Pylons-0.9.6.1-py2.5.egg/
pylons/database.py", line 137, in make_session
engine = create_engine(uri, echo=echo, **kwargs)
File "/usr/lib/python2.5/site-packages/Pylons-0.9.6.1-py2.5.egg/
pylons/database.py", line 84, in create_engine
assert uri
AssertionError
"""
The tables are created with all the constraints but not the istances
'delete' in the role ad admin in the user tables.
I did also update my AuthKit package with the trunk version but the
result is the same.
I did develop a lot of code on Zope but I find Pylons too nice and I
want try to change.
But my job is to develop administrative and business tool and the
permission record by record is necessary. So I must develop a db level
sistem of permission and the user ad role must be inside the database.
Help me, thanks.
Enrico
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---