where the akb_signature_uuid is defined?

in a model or module

from gluon import current
current.akb_signature_uuid = akb_signature_uuid = something

then in appadmin

from gluon import current

does not works¿

http://zerp.ly/rochacbruno
Em 29/02/2012 06:26, "Johann Spies" <johann.sp...@gmail.com> escreveu:

> I have this in a model. It is included in many tables.
>
> akb_signature = db.Table(db, 'akb_signature',
>                      Field('created_on', 'datetime', default = request.now,
>                            readable = False, writable = False),
>                      Field('created_by', db.auth_user, default =
> auth.user_id,
>                            readable = False, writable = False),
>                      Field('updated_on', 'datetime', default = request.now,
>                            readable = False, writable = False),
>                      Field('updated_by', db.auth_user, update =
> auth.user_id,
>                            readable = False, writable = False)
>                      )
>
> While migrating table definitions to modules I used it in this way:
>
> class Inst(object):
>
>     def __init__(self, db,):
>         self.db = db
>         self.T = current.T
>         self.auth = current.session.auth
>         self.tabelle = ["institution", 'inst_altername']
>         self.define_tables()
>
>     def define_tables(self):
>         for tbl in self.tabelle:
>             if tbl not in self.db.tables:
>                 if tbl == 'inst_altername':
>                     self.inst_alt()
>                 elif tbl == 'institution':
>                     self.institution()
>                 else:
>                     pass
>
>     def institution(self):
>         table = self.db.define_table('institution',
>                                      Field('name'),
>                                     ... several other fields
>                                      current.akb_signature_uuid
>                                      )
>
> In appadmin I have:
>
>  t = Inst(db)
>
> and it shows the table but when I edit it or insert a new record I get a
> ticket:
>
> KeyError: 'akb_signature_uuid'
>
> So how do I expose akb_signature_uuid in this case to appadmin?
>
> Regards
> Johann
> --
>
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)
>
>

Reply via email to