On Jun 29, 2006, at 10:27 PM, [EMAIL PROTECTED] wrote:

>
> Nice!

Thanks!

>
> I've hacked up a new patch for quickstart, identity and visit:
> http://trac.turbogears.org/turbogears/attachment/ticket/922/ 
> sa02_r1600.patch

Ahh, I'll check that out. I'm acutally almost done with my take on  
all of that, so I'll see what I can crib from your patch.

> I don't have any real app to test this on yet, so I'm sure there are
> some bugs to work out.
>
> Since the PackageEngine was removed the tables defined in quickstart
> conflicted with the same table definitions in the core.  I've set
> "redefine=True" so these override the ones in
> "turbogears.identity.saprovider", but maybe there's a better way to
> handler that.

I had a simple solution for most of the problem: I deleted the tables  
from saprovider.py :)

However, I also moved the Visit model into model.py_tmpl, but left  
the old one there for compatibility. I had a simple solution to that  
one; I changed the name to just "Visit" instead of "TG_Visit".

The correct solution is actually something like this:

cls_path = get("something.model.whatever", None)
if cls_path is None:
     the_cls = get_model_class()
else:
     the_cls = load_class(cls_path)


def get_model_class():
     class Thingy(ActiveMapper):
         ...
     return Thingy


I've actually done a fair bit of cleanup while I've been monkeying  
around in here. I have a good reason: I need to write the SQLAlchemy  
chapter for the book, so I need to finalize what exactly that looks  
like :)

In my copy, "tg-admin sql create" works with SQLAlchemy ;)

Kevin

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

Reply via email to