great jobs massimo and everyone, just found some on the latest version
1. admin page, manage button (dropdown menu) not work (no errors occured)
2. before insert callback (put it on module) is not work in latest version,
while the same code and same step is work in 2.14.6-stable
Traceback (most recent call last):
File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in
restricted
exec(ccode, environment)
File
"/Users/MacBookPro/site/web2py/applications/test/controllers/install.py",
line 422, in <module>
File "/Users/MacBookPro/site/web2py/gluon/globals.py", line 406, in
<lambda>
self._caller = lambda f: f()
File
"/Users/MacBookPro/site/web2py/applications/test/controllers/install.py",
line 208, in index
redemption_unit_plan = 0)
File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/objects.py",
line 731, in insert
row = self._fields_and_values_for_insert(fields)
File "/Users/MacBookPro/site/web2py/gluon/packages/dal/pydal/objects.py",
line 709, in _fields_and_values_for_insert
'Table: missing required field: %s' % name)
RuntimeError: Table: missing required field: fund_manager
step i took start new web app from scratch from terminal with (same steps
with same code works in 2.14.6 but an error occured in latest version) :
cd
rm -rf ~/site/web2py/applications/test
cp -R ~/site/web2py/applications/welcome/ ~/site/web2py/applications/test
rsync -zavr ~/Programming/Python/Web2py/test ~/site/web2py/applications/
rsync -zavur ~/Programming/Python/Web2py/test ~/site/web2py/applications/
curl http://127.0.0.1:8000/test/install
*code in line 208*
*controllers/install.py*
def index():
# code removed till line 208
db.account.insert(account_no = '1', investor = 1, product = 5,
selling_agent = 1,
nav_date = '2016-01-01', min_redemption = 1, target_duration = 0,
target_nav = 1, target_profit_n_loss = 0, target_profit_n_loss_percentage
= 0,
redemption_plan = 'Profit, Amount Redeem > 1, Amount Redeem < Profit',
redemption_unit_plan = 0)
*modules/callback.py*
def before_insert_account(f):
query_product = (current.db.product.id == f['product'] )
row_product = current.db(query_product).iterselect(cache =
(current.cache.ram, 3600),
cacheable = True).first()
f['fund_manager'] = int(row_product.fund_manager)
f['custodian_bank'] = int(row_product.custodian_bank)
f['currency'] = int(row_product.currency)
delta = datetime.timedelta(days = int(row_product.duration) )
f['redemption_date_plan'] = datetime.datetime.strptime(f['nav_date'],
'%Y-%m-%d') + delta
thanks and best regards,
stifan
--
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.