Model:

db.define_table('article',
                Field('art_id', 'reference akb_articles'),
                Field('title', type=citext), #artikel titel
                Field('abstract',type=citext), #ab
                Field('doc_type', length=78),
                Field('author_count', 'integer'),
                Field('ut', length=15, unique = True),
                Field('url', 'text'),
                rname = 'level1.article',
                migrate = MIGRATE,
                fake_migrate = FAKE_MIGRATE)

No problem there but as soon as I add

db.article.url.represent = lambda x, record: get_url(x)

where

get_url looks like this:

def get_url(url):
    if url:
        address = A('click here to see pdf', _target = "_blank",
                    _href = "a prefix to the url added %s" % url)
    else:
        address = ''
    return address

I get

KeyError: 'Cannot resolve reference akb_articles in article definition'


Is this a bug?

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to