Set migrate = (Empty string) => False
> On Aug 13, 2015, at 8:58 AM, ermolaev.icrea...@gmail.com wrote: > > I talk about it! > > If in .ini file: > > migrate = False > > it conderted to string too and is True in python code! > > понедельник, 3 августа 2015 г., 3:51:52 UTC+3 пользователь Mark Graves > написал: >> >> What is the proper syntax for appconfig.ini if the cast is a boolean. >> >> With a fresh install of web2py source, >> >> appconfig.ini contents: >> >> >> ; App configuration >> >> ; db configuration >> >> [db] >> >> uri = sqlite://storage.sqlite >> migrate = 0 >> pool_size = 1 >> >> ; smtp address and credentials >> [smtp] >> server = smtp.gmail.com:587 >> sender = y...@gmail.com >> login = username:password >> >> ; form styling >> [forms] >> formstyle = bootstrap3_inline >> separator = >> >> >> >> >> default/index >> >> >> >> myconf = AppConfig(reload=True) >> >> mc = myconf.take('db.migrate',cast=bool) >> >> print mc >> print type(mc) >> >> >> >> output: >> >> >> >> True >> <type 'bool'> >> >> switching to False yields same output. >> >> What am i doing wrong? > > -- > 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 a topic in the Google > Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/rohbrJEZG_E/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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.