On 10/12/06, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
>
> Jorge Godoy wrote:
> >
>
> I have it now running. Instead of duplicating the user and group tables,
> I have modified the User and Group classes to read from pg_user and
> pg_group instead of tg_user and tg_group etc. I mapped the postgresql
> column names usename and usesysid to user_name and user_id etc.
> (manually - it does not seem to be possible with ActiveMapper, cmiiamw).
activeMapper goal is to create the obvious relations, this of course
is not there but that's why ActiveMapper is so great, it gives you
automatic stuff for simple tasks and doesn't hides SA for complex
ones.
> I also had to tweak the model concerning the relation between users and
> groups. Instead of creating my own permissions table, I used one that
> already existed in the data model of the legacy application. And finally
> I had to replace the validate_password() method with an attempt to login
> with that user and password on the same database that sqlalchemy.dburi
> is pointing to.
yes that method needs to be refactor to provide a simplier way of
checking autentication.
> Only the visit tables had to be created on the database.
>
> By the way, the visit table is defined two times with different names in
> the turbogears visit module ("tg_visit") and in model.py ("visit").
> Instead of redefining the class in model.py, turbogears should simply
> reference the already defined class in the visit module.
>
on the contrary the ones inside turbogears are deprecated, the reason
all that was moved to the model is flexibility.
> -- Christoph
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---