avoid circular import

This commit is contained in:
j 2013-07-25 10:58:16 +02:00
parent c9b9aa935f
commit a89d3e9359

View file

@ -16,8 +16,6 @@ import ox.web.imdb
import ox.web.wikipedia import ox.web.wikipedia
import ox.web.allmovie import ox.web.allmovie
import movie.models
from modules import get_info from modules import get_info
oxdb_api = ox.API('http://0xdb.org/api/') oxdb_api = ox.API('http://0xdb.org/api/')
@ -108,7 +106,8 @@ class MovieId(models.Model):
# self.gen_oxdb_id() # self.gen_oxdb_id()
self.save() self.save()
if self.imdb_id: if self.imdb_id:
m, created = movie.models.Imdb.objects.get_or_create(imdb=self.imdb_id) from movie.models import Imdb
m, created = Imdb.objects.get_or_create(imdb=self.imdb_id)
m.update() m.update()
def gen_oxdb_id(self): def gen_oxdb_id(self):