Skip to content

ImportError: No module named 'registry' #50

@antonchasnyk

Description

@antonchasnyk

I got an Error at Python3.5.2 Django 1.11
ImportError: No module named 'registry'
locate init.py
def register(model_cls, config_cls=None):
from registry import Registry
Registry.register(model_cls, config_cls)

def unregister(model_cls):
from registry import Registry
Registry.unregister(model_cls)

I solve this issue using relative imput:
.....
from .registry import .....
......

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions