This code work without a problem in
 Version 2.9.12-stable+timestamp.2015.01.17.06.11.03

but not with the code from the trunk:

def za_arts_by_journal_by_year():

    db.define_table('za_wos_papers_by_journal_by_year',
                    Field('journal', type=citext),
                    Field('pubyear', 'integer'),
                    Field('articles', 'integer'),
                    migrate = False,
                    rname = 'isi.za_wos_papers_by_journal_by_year')
    grid = SQLFORM.grid(db.za_wos_papers_by_journal_by_year,
                        fields=[db.za_wos_papers_by_journal_by_year.journal,
                                db.za_wos_papers_by_journal_by_year.pubyear,

db.za_wos_papers_by_journal_by_year.articles],
                        create = False,
                        editable = False,
                        details = False,
                        deletable = False,
                        searchable = False,
                        maxtextlength= 200,
                        paginate=120,

orderby=~db.za_wos_papers_by_journal_by_year.pubyear|~db.za_wos_papers_by_journal_by_year.articles)
    grid.element('.web2py_counter',replace=None)

where "orderby" is on line 391.

The error:

Traceback (most recent call last):
  File "/home/js/web2py/gluon/restricted.py", line 227, in restricted
    exec ccode in environment
  File "/home/js/web2py/applications/nkb/controllers/wos_indicators.py"
<http://localhost:8000/admin/default/edit/nkb/controllers/wos_indicators.py>,
line 818, in <module>
  File "/home/js/web2py/gluon/globals.py", line 393, in <lambda>
    self._caller = lambda f: f()
  File "/home/js/web2py/applications/nkb/controllers/wos_indicators.py"
<http://localhost:8000/admin/default/edit/nkb/controllers/wos_indicators.py>,
line 391, in za_arts_by_journal_by_year
    
orderby=~db.za_wos_papers_by_journal_by_year.pubyear|~db.za_wos_papers_by_journal_by_year.articles)
  File "/home/js/web2py/gluon/sqlhtml.py", line 2720, in grid
    elif isinstance(field.type, SQLCustomType) and
callable(field.type.represent):
AttributeError: 'SQLCustomType' object has no attribute 'represent'


I did know how to create an issue on the mercurial trunk but I am not sure
about the git repository.  What is the url again?

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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to