Django 1.7 conflicting models -


I am setting up my project in the "project / apps / myapp" folder. Both apps and map folders have init .i files (without any of them missing module is missing) I now have an error:

  Exception type: runtime Error / Exception Price: In the disputed 'person' model, the application 'resume': & lt; Class 'apps.resume.models.Person' & gt; And & lt; Class 'resume.models.Person' & gt;  

Django imports the same model with two different patts How can I fix this?

Full error log:

  traceback: file "/home/voxa/.virtualenvs/42-test/local/lib/python2.7 / site-packages / django /core/handlers/base.py "get_response 98. resolver_match = file resolver.resolve (request.path_info)" /home/voxa/.virtualenvs/42-test/local/lib/python2.7 / site-packages / django in /core/urlresolvers.py "resolution 343. the pattern self.url_patterns: file" /home/voxa/.virtualenvs/42-test/local/lib/python2.7/site-packages/ Django / core / urlresolvers .py "(urlpatterns", self.urlconf_module file /home/voxa/.virtualenvs/42-test/local/lib/python2.7/ url_patterns 372. pattern = getattr self.urlconf_module,) "in" site-packages / Django 366 self._urlconf_module = import_module (self.urlconf_name) file in / core / urlresolvers.py "urlconf_module" / usr / lib / python2 In .7 / importlib / __ init__.py "import_module 37. __import __ in (name) file" /home/voxa/django/FortyTwoTestTask/fortytwo_test_task/urls.py "& lt; Mod ule & gt; 4. Restart imported scenes in the file "/home/voxa/django/FortyTwoTestTask/apps/resume/views.py" & lt; Module & gt; 4. From the beginning again. Models import person file "/home/voxa/django/FortyTwoTestTask/apps/resume/models.py" in & lt; Module & gt; 3. class person (models.Model): __new__ file "/home/voxa/.virtualenvs/42-test/local/lib/python2.7/site-packages/django/db/models/base.py" 285. new_class._meta.apps.register_model (new_class._meta.app_label, new_class) file "/home/voxa/.virtualenvs/42-test/local/lib/python2.7/site-packages/django/apps/registry.py" Register_model 213. (Model_Name, AP_Label, AP_models [Model_Name], model)) Exception type: Error / Exception value on runtime: 'Resume' model in the application 'Resume': & lt; Class 'apps.resume.models.Person' & gt; And & lt; Class 'resume.models.Person' & gt;  

Instead of importing all the modules inside the app, the module just imports inside the app

  Use  

from the webproject.app import model

>


Comments