Re: Circular import problem

2014-04-16 Thread Johannes Schneider
You can use from foo import bar inside your method/class definitions or you can use import foo.bar. bg, Johannes On 16.04.2014 11:37, Daniel Oźminkowski wrote: Hello, I recently cut my models.py into separate files and now I try to fix all the problems with imports that showed up. I hit the w

Circular import problem

2014-04-16 Thread Daniel Oźminkowski
Hello, I recently cut my models.py into separate files and now I try to fix all the problems with imports that showed up. I hit the wall on this one though. Purpose of the application is to process a text file with instructions and fit them into hierarchical structure like this: Program <- Node

Re: Circular import problem

2013-04-13 Thread bubufff
Thank all, I just moved the import to the local function and it works. Still re-factoring the codes to overcome this issue completely On Friday, April 12, 2013 1:08:26 AM UTC+7, bub...@gmail.com wrote: > > Hi all, > > I have a util file, which will do some stuffs and then, update a model (so >

Re: Circular import problem

2013-04-11 Thread Nikolas Stevenson-Molnar
Circular import itself isn't a problem--Python will deal with that. Problems arise according to the order in which classes, etc. are loaded from each module and where the required classes are used. As the previous poster mentioned, you can get around this by moving one of the import statements insi

Re: Circular import problem

2013-04-11 Thread andres . osinski
ry de Movistar (http://www.movistar.com.ar) -Original Message- From: bubu...@gmail.com Sender: django-users@googlegroups.com Date: Thu, 11 Apr 2013 11:08:26 To: Reply-To: django-users@googlegroups.com Subject: Circular import problem Hi all, I have a util file, which will do some stuff

Circular import problem

2013-04-11 Thread bubufff
Hi all, I have a util file, which will do some stuffs and then, update a model (so i have to import the models in this file). Also, in my models file, I trigger a post_save signal to call the util file file (so I have to import this file in the models file). Obviously, I will get a circle impor