I'm glad Identity has *mostly* been working for you. The goal is to  
have everything work right out of the box, that's why Identity makes  
certain the tables actually exist before starting up. Even if you're  
using a custom model (and I'm glad that worked easily for you),  
SqlObjectIdentityProvider (aka soprovider) requires the tables to  
function correctly.

The standard behaviour is to only create the tables if they don't  
exist. This works fine so long as we're talking about tables.  
SQLObject doesn't seem to understand what a view is and so you'll get  
a collision if you're using views for your model objects (see ticket  
#595). This is an opportunity for SQLObject enhancement.

In the long run, I'd like tg-admin to automatically call each  
extension's model by calling create_model_extension. I don't know  
what the command should be (possibly piggy-back on sql create?) but  
it certainly would be nice.

However, if the extension (in this case Identity) is enabled, it  
seems reasonable that it should be able to require the existence of  
its model. Once SQLObject has been enhanced to support checking for  
views, this will be a no brainer: if you've already created the  
schema, nothing will happen...

The second problem is just a stupid bug... I'll fix it, but a ticket  
would help me remember.

On 21 Feb, 2006, at 2:52 pm, Lateef Jackson wrote:

>
> TG Version 0.9a0dev-r791
> Over the last couple of days I have been happily upgrading to TG 0.9
> from TG 0.89. I have run into a couple problems:
>
> I have my own implementation SQLObjects that I wanted to use and
> thankfully the documentation at: http://nerd.newburyportion.com/
> 2006/01/refining-the-identity-framework
> worked great until the identity framework was trying to create tables
> that already existed. (I write all the schema changes by hand and am
> running Postgresql 8.1). I commented out these lines in the code that
> create the tables but I think I might be missing a config option like
> identity.soprovider.model.createTable=False?
>
>
> I did not implement TG_Permission (yet) however the table does exist
> in the public schema.
> Here is the stack dump
>
>
> Unhandled exception in thread started by <bound method Server._start
> of <cherrypy._cpserver.Server object at 0xb7b770cc>>
> Traceback (most recent call last):
>    File "/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-
> py2.4.egg/cherrypy/_cpserver.py", line 103, in _start
>      func()
>    File "/usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r650-
> py2.4.egg/turbogears/startup.py", line 175, in startTurboGears
>      ext.start_extension()
>    File "/usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r650-
> py2.4.egg/turbogears/identity/visitor.py", line 30, in start_extension
>      create_extension_model()
>    File "/usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r650-
> py2.4.egg/turbogears/identity/visitor.py", line 45, in
> create_extension_model
>      provider.create_provider_model()
>    File "/usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r650-
> py2.4.egg/turbogears/identity/soprovider.py", line 137, in
> create_provider_model
>      user_class.createTable(ifNotExists=True)
>
>
> The second problem I am having is minor. When I raise
> identity.IdentityFailure( _("Please login")) the ${message} display a
> list of characters like so:
> ['P', 'l', 'e', 'a', 's', 'e', ' ', 'l', 'o', 'g', 'i', 'n']
>
>
> Thanks,
> Lateef
>
>
> Lateef Jackson
> [EMAIL PROTECTED]
> 704.502.4337
> po box 31064
> charlotte, nc 28231
>
>
>
>
>
>

-- 
Jeff Watkins
http://newburyportion.com/

"Daddy, I want a purple iMac. And I want ice cream!"
-- Unidentified 7-year-old to his father.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to