Skip to content

Commit

Permalink
fix cyclic imports errors
Browse files Browse the repository at this point in the history
  • Loading branch information
darius BERNARD committed Jan 6, 2017
1 parent 9734dc3 commit 022ca76
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 0 additions & 5 deletions rest_models/backend/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
# -*- coding: utf-8 -*-

from rest_models.checks import register_checks

register_checks()
5 changes: 5 additions & 0 deletions rest_models/backend/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
from rest_models.backend.utils import message_from_response
from rest_models.router import RestModelRouter

from rest_models.checks import register_checks

register_checks()


logger = logging.getLogger(__name__)

Alias = namedtuple('Alias', 'model,parent,field,attrname,m2m')
Expand Down
3 changes: 2 additions & 1 deletion rest_models/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
from django.apps import apps
from django.core.checks import Error, Tags, register

from rest_models.backend.compiler import get_resource_path
from rest_models.router import RestModelRouter

logger = logging.getLogger(__name__)


def api_struct_check(app_configs, **kwargs):
from rest_models.backend.compiler import get_resource_path # NOQA

errors = []

all_models = []
Expand Down

0 comments on commit 022ca76

Please sign in to comment.