Doesn't work either. Gives following output: Cannot import config file [T:\MyFolder\SubFolder\etc\config]
Notice that I run following command to run web2py: C:\Python27\python.exe T:/MyFolder/SubFolder/web2py.py --config=T:\MyFolder\ SubFolder\etc\*config.py* , but it was *config* that coulnd't be found and not *config.py*. The path to the config file is correct, because I copied it with PyCharm's copy path command so there is no mistake there. I also created *__init__.py *file inside *etc* directory, because I wasn't sure if this command import config file as a python module or as a normal file. W dniu sobota, 12 lipca 2014 09:34:11 UTC+2 użytkownik Massimo Di Pierro napisał: > > Can you try: > > --config=T:/MyFolder/etc/config.py > > It is not finding the file. > > On Thursday, 10 July 2014 03:56:37 UTC-5, Kuba Kozłowicz wrote: >> >> I have following project structure: >> >> T:/MyFolder/web2py.py >> T:/MyFolder/etc/config.py >> >> I am trying to run the instance with following command: >> >> C:\Python27\python.exe T:/MyFolder/web2py.py --config= >> 'T:/MyFolder/etc/config.py' >> >> And I am getting following response: >> >> Cannot import config file ['T:/MyFolder/etc/config.py'] >> >> Could you please provide one, complete example of a command, that can run >> the instance from command line and loads the setttings from a config file? >> >> I couldn't find anything neither in the docs nor in the web. >> >> W dniu środa, 9 lipca 2014 14:04:20 UTC+2 użytkownik Massimo Di Pierro >> napisał: >>> >>> You should in fact use a different filename for your --config. The >>> paramater_<>.py file is meant to contain only the password and it can be >>> overwritten by web2py if you change your password using the admin interface. >>> >>> On Tuesday, 8 July 2014 06:40:20 UTC-5, Kuba Kozłowicz wrote: >>>> >>>> I am trying to run web2py application from command line with such a >>>> command: >>>> >>>> C:\Python27\python.exe T:/MyFolder//web2py.py -a '<recycle>' --config= >>>> parameters_8080.py >>>> >>>> and I have specified my application's settings in the file called >>>> "parameters_8080.py": >>>> >>>> password= >>>> "pbkdf2(1000,20,sha512)$9b51a45d2413e210$cc5ea267ebe279f1af5dedf3710b3c9e95cf4f8e" >>>> port = 8080 >>>> ip = '127.0.0.1' >>>> >>>> 1. Whenever I enter one of my application's page, this the file >>>> "parameters_8080.py" gets cleard so that only password field stays inside >>>> it. Why does this happen? >>>> I think the docs do not specify clearly how to use '<recycle>' and what >>>> is going on here. >>>> >>>> >>>> 2. Is it possible to specify that config file somewhere else than in >>>> project's root folder and named as "parameters_<port>.py" ? I want to >>>> create a folder called "etc" in my application and put config there. >>>> >>> -- 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.