old gnuviechadmin web interface code that is not developed anymore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
567B

  1. # -*- python -*-
  2. # -*- coding: utf-8 -*-
  3. from sqlalchemy import orm
  4. from gnuviechadminweb.model.tables import *
  5. import logging
  6. log = logging.getLogger(__name__)
  7. class Group(object):
  8. pass
  9. class Role(object):
  10. pass
  11. class User(object):
  12. pass
  13. orm.mapper(Group, t_group, {
  14. 'users' : orm.relation(User),
  15. })
  16. orm.mapper(Role, t_role, properties = {
  17. 'users' : orm.relation(User, secondary = t_user_role),
  18. })
  19. orm.mapper(User, t_user, properties = {
  20. 'roles' : orm.relation(Role, secondary = t_user_role),
  21. 'group' : orm.relation(Group)
  22. })