To try to triage the bug I did the following...
import os
import pygeoip
#gi = pygeoip.GeoIP(os.path.join(request.folder, 'private', 'GeoIP.dat'))
def get_country(row):
return "what?"
# -*- coding: utf-8 -*-
db.define_table('melodigram_play',
Field('melodigram_id', 'reference melodigram'),
Field('when_opened', 'datetime', default = request.now),
Field('from_where', 'string', default = request.client),
Field.Virtual('from_country', lambda row: get_country(row))
)
db.melodigram_play.melodigram_id.requires = IS_NOT_EMPTY()
db.melodigram_play.when_opened.requires = IS_NOT_EMPTY()
-----------------------------------------------------------------------------------------------
Basically I just remove everything and returned a text object.
This still gives me the same error.
File "/home/encompass/Projects/melodigram/web2py/applications/melodigram/views/administration/browser.html", line 101, in <module>
File "/home/encompass/Projects/melodigram/web2py/gluon/dal.py", line 7267, in __getitem__
raise ae
AttributeError: 'Row' object has no attribute 'from_country'