Re: import file from view.py

2018-03-14 Thread sum abiut
Thanks, i manage to resolve that by creating a function on the conf.py file which connect to the db, then call that function from view.py conf.py from sqlalchemy import* def connect(): engine=create_engine('mssql+pymssql://userbame:password@host /db') connection=engine.connect() retu

Re: import file from view.py

2018-03-14 Thread Mahesh M J
Hi, You can try to create a Python module and write a parser there and set the variables. You can import that file in views.py and use it for getting the relevant values. Hope this helps. Thanks, Mahesh. On Tue, Mar 13, 2018 at 21:06 sum abiut wrote: > I have a conf file containing the paramete

Re: import file from view.py

2018-03-14 Thread Etienne Robillard
show us some code man :-) Etienne Le 2018-03-13 à 21:06, sum abiut a écrit : I have a conf file containing the parameter of hostmane,db,usernam,pass, db i want to import that file from view.py and use parameter from the conf file to connect to a db. i did something this from appname.conf

import file from view.py

2018-03-13 Thread sum abiut
I have a conf file containing the parameter of hostmane,db,usernam,pass, db i want to import that file from view.py and use parameter from the conf file to connect to a db. i did something this from appname.conf import but it doesn't seem to work, appreciate any assistance. cheers -- You recei