Re: Project directory management

2020-02-28 Thread Naveen Arora
Hi,

from .. import abc is not working ?
or somewhat like that.

At last sys.path.append() is one of the solutions.

Cheers,
Naveen Arora


On Friday, 28 February 2020 16:38:15 UTC+5:30, Devender Kumar wrote:
>
> Hi,
> BTW it is flask app question.
>
> dir structure 
>  service 
>  config/__init__.py
> config/config.py
> src/app.py
> src/__init__.py
>
> Running the flask app by writing command python src/app.py
>
> Question: I want to access config parameter in flask app from config 
> module of config package how can do that. 
>
> *solutions I tried* write *sys.path.append(''../")*  to my 
> src/__init__.py file but its not working please help me write this right 
> way.
>
> seems src/__init__.py is not being called.
>
> I don't want to change my dir structure and I don't want to write 
> *sys.path.append(''../")* in my app.py file, 
>
> Thanks in advance 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/83d12e3d-f5c3-4bd2-8e7f-a8b69b12afdc%40googlegroups.com.


Re: Project directory management

2020-02-28 Thread Agoua David
Since the flask app config is a singleton, I think you can just call it in
your config/config.py module by import src/app.py if src is a package

Le ven. 28 févr. 2020 à 11:09, Devender Kumar  a
écrit :

> Hi,
> BTW it is flask app question.
>
> dir structure
>  service
>  config/__init__.py
> config/config.py
> src/app.py
> src/__init__.py
>
> Running the flask app by writing command python src/app.py
>
> Question: I want to access config parameter in flask app from config
> module of config package how can do that.
>
> *solutions I tried* write *sys.path.append(''../")*  to my
> src/__init__.py file but its not working please help me write this right
> way.
>
> seems src/__init__.py is not being called.
>
> I don't want to change my dir structure and I don't want to write
> *sys.path.append(''../")* in my app.py file,
>
> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5b1e9a97-bede-4454-8b32-9d477fe4d954%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAByCr6ieOZSv08BDxNJ73sR7UardcW0yipnhiZ%3D6iiS2oq6jbA%40mail.gmail.com.


Re: Project directory management

2020-02-28 Thread Andréas Kühne
If it is a flask app question, you should ask it on a flask mailing list.
You will probably get better responses :-)

Regards,

Andréas


Den fre 28 feb. 2020 kl 12:08 skrev Devender Kumar :

> Hi,
> BTW it is flask app question.
>
> dir structure
>  service
>  config/__init__.py
> config/config.py
> src/app.py
> src/__init__.py
>
> Running the flask app by writing command python src/app.py
>
> Question: I want to access config parameter in flask app from config
> module of config package how can do that.
>
> *solutions I tried* write *sys.path.append(''../")*  to my
> src/__init__.py file but its not working please help me write this right
> way.
>
> seems src/__init__.py is not being called.
>
> I don't want to change my dir structure and I don't want to write
> *sys.path.append(''../")* in my app.py file,
>
> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5b1e9a97-bede-4454-8b32-9d477fe4d954%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCeB04i%3DYW92upzs0Wk9k_cOSz1KP_vvT0BbYMDqF8uo3w%40mail.gmail.com.


Project directory management

2020-02-28 Thread Devender Kumar
Hi,
BTW it is flask app question.

dir structure 
 service 
 config/__init__.py
config/config.py
src/app.py
src/__init__.py

Running the flask app by writing command python src/app.py

Question: I want to access config parameter in flask app from config module 
of config package how can do that. 

*solutions I tried* write *sys.path.append(''../")*  to my src/__init__.py 
file but its not working please help me write this right way.

seems src/__init__.py is not being called.

I don't want to change my dir structure and I don't want to write 
*sys.path.append(''../")* in my app.py file, 

Thanks in advance 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5b1e9a97-bede-4454-8b32-9d477fe4d954%40googlegroups.com.