Upgrading from Django 1.6.7 to 1.8.3, RuntimeError: Conflicting models in application The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceDjango 1.7 conflicting modelsImportError After Moving App to Nested FolderCan't run Scrapy project in DjangoHow can I import model from another app in DjangoError in models running Django 1.9.5Django 1.8 throws an error: django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet(Django-Celery Error) ImportError: No module named myprojectupdating UserProfile (OneToOne model to Django User model)How to import python function from another file into django viewsDjango urlpatterns - too many values to unpackDjango: Importing models in models.py from outside project does not work

What can I do if neighbor is blocking my solar panels intentionally?

Student Loan from years ago pops up and is taking my salary

What information about me do stores get via my credit card?

How to support a colleague who finds meetings extremely tiring?

Identify 80s or 90s comics with ripped creatures (not dwarves)

Voltage transmission

Accepted by European university, rejected by all American ones I applied to? Possible reasons?

Button changing its text & action. Good or terrible?

One-dimensional Japanese puzzle

Could an empire control the whole planet with today's comunication methods?

Is 'stolen' appropriate word?

How to make Illustrator type tool selection automatically adapt with text length

Sub-subscripts in strings cause different spacings than subscripts

"... to apply for a visa" or "... and applied for a visa"?

What does "spokes" mean in this context?

Do I have Disadvantage attacking with an off-hand weapon?

Can each chord in a progression create its own key?

Am I ethically obligated to go into work on an off day if the reason is sudden?

Why did Peik Lin say, "I'm not an animal"?

Do warforged have souls?

Does Parliament need to approve the new Brexit delay to 31 October 2019?

How many Rusted Keys do you need to get red items most of the time?

number sequence puzzle deep six

Single author papers against my advisor's will?



Upgrading from Django 1.6.7 to 1.8.3, RuntimeError: Conflicting models in application



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceDjango 1.7 conflicting modelsImportError After Moving App to Nested FolderCan't run Scrapy project in DjangoHow can I import model from another app in DjangoError in models running Django 1.9.5Django 1.8 throws an error: django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet(Django-Celery Error) ImportError: No module named myprojectupdating UserProfile (OneToOne model to Django User model)How to import python function from another file into django viewsDjango urlpatterns - too many values to unpackDjango: Importing models in models.py from outside project does not work



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








3















I'm using Django 1.8.3 and Python 2.7.6



My project structure:
project/
__init__.py
app/
__init__.py
sa1/
__init__.py
admin.py
models.py
interface.py
sa2/
__init__.py
forms.py
urls.py
views.py
app/
__init__.py
admin.py
models.py
tests.py
views.py


I tried to import models in sa2/forms.py as follows:



from project.app.sa2.models import Mo1, Mo2, Mo3


This raised an error -



Exception Type: RuntimeError at /
Exception Value: Conflicting 'mo1' models in application 'app': <class
'project.app.models.Mo1'> and <class 'app.models.Mo1'>


I've tried to solve it using: Django 1.7 conflicting models



So, I Changed it to:



from app.sa2.models import Mo1, Mo2, Mo3


This raised an error => ImportError: no module named sa2



So, I took another approach by getting rid of __init__.py in project/ as mentioned in https://code.djangoproject.com/ticket/22280



This raised another error => ImportError: No module named project.website.settings



Please help me debug this.










share|improve this question






























    3















    I'm using Django 1.8.3 and Python 2.7.6



    My project structure:
    project/
    __init__.py
    app/
    __init__.py
    sa1/
    __init__.py
    admin.py
    models.py
    interface.py
    sa2/
    __init__.py
    forms.py
    urls.py
    views.py
    app/
    __init__.py
    admin.py
    models.py
    tests.py
    views.py


    I tried to import models in sa2/forms.py as follows:



    from project.app.sa2.models import Mo1, Mo2, Mo3


    This raised an error -



    Exception Type: RuntimeError at /
    Exception Value: Conflicting 'mo1' models in application 'app': <class
    'project.app.models.Mo1'> and <class 'app.models.Mo1'>


    I've tried to solve it using: Django 1.7 conflicting models



    So, I Changed it to:



    from app.sa2.models import Mo1, Mo2, Mo3


    This raised an error => ImportError: no module named sa2



    So, I took another approach by getting rid of __init__.py in project/ as mentioned in https://code.djangoproject.com/ticket/22280



    This raised another error => ImportError: No module named project.website.settings



    Please help me debug this.










    share|improve this question


























      3












      3








      3








      I'm using Django 1.8.3 and Python 2.7.6



      My project structure:
      project/
      __init__.py
      app/
      __init__.py
      sa1/
      __init__.py
      admin.py
      models.py
      interface.py
      sa2/
      __init__.py
      forms.py
      urls.py
      views.py
      app/
      __init__.py
      admin.py
      models.py
      tests.py
      views.py


      I tried to import models in sa2/forms.py as follows:



      from project.app.sa2.models import Mo1, Mo2, Mo3


      This raised an error -



      Exception Type: RuntimeError at /
      Exception Value: Conflicting 'mo1' models in application 'app': <class
      'project.app.models.Mo1'> and <class 'app.models.Mo1'>


      I've tried to solve it using: Django 1.7 conflicting models



      So, I Changed it to:



      from app.sa2.models import Mo1, Mo2, Mo3


      This raised an error => ImportError: no module named sa2



      So, I took another approach by getting rid of __init__.py in project/ as mentioned in https://code.djangoproject.com/ticket/22280



      This raised another error => ImportError: No module named project.website.settings



      Please help me debug this.










      share|improve this question
















      I'm using Django 1.8.3 and Python 2.7.6



      My project structure:
      project/
      __init__.py
      app/
      __init__.py
      sa1/
      __init__.py
      admin.py
      models.py
      interface.py
      sa2/
      __init__.py
      forms.py
      urls.py
      views.py
      app/
      __init__.py
      admin.py
      models.py
      tests.py
      views.py


      I tried to import models in sa2/forms.py as follows:



      from project.app.sa2.models import Mo1, Mo2, Mo3


      This raised an error -



      Exception Type: RuntimeError at /
      Exception Value: Conflicting 'mo1' models in application 'app': <class
      'project.app.models.Mo1'> and <class 'app.models.Mo1'>


      I've tried to solve it using: Django 1.7 conflicting models



      So, I Changed it to:



      from app.sa2.models import Mo1, Mo2, Mo3


      This raised an error => ImportError: no module named sa2



      So, I took another approach by getting rid of __init__.py in project/ as mentioned in https://code.djangoproject.com/ticket/22280



      This raised another error => ImportError: No module named project.website.settings



      Please help me debug this.







      python django django-models upgrade django-1.8






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 23 '17 at 11:58









      Community

      11




      11










      asked Jul 23 '15 at 6:02









      Sai Kaushik BorraSai Kaushik Borra

      164




      164






















          2 Answers
          2






          active

          oldest

          votes


















          2














          I had the some problem. From within sa2 try



          from sa2.models import Mo1, Mo2, Mo3 


          or alternatively



          from .models import Mo1, Mo2, Mo3


          CATCH: be sure to use the same imports in your forms.py, tests.py or wherever else you import those models. If you update only one of the import it will not work and you will still get the same error.



          The problem occurs because of a double import. For more information please see this : The Double Import Trap



          Good luck



          P.S. no __init__.py were hurt in the process






          share|improve this answer






























            0














            Remove __init __.py file in project folder. I have same error when use test in Django and then I remove it, error is disappear.






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31579304%2fupgrading-from-django-1-6-7-to-1-8-3-runtimeerror-conflicting-models-in-applic%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              I had the some problem. From within sa2 try



              from sa2.models import Mo1, Mo2, Mo3 


              or alternatively



              from .models import Mo1, Mo2, Mo3


              CATCH: be sure to use the same imports in your forms.py, tests.py or wherever else you import those models. If you update only one of the import it will not work and you will still get the same error.



              The problem occurs because of a double import. For more information please see this : The Double Import Trap



              Good luck



              P.S. no __init__.py were hurt in the process






              share|improve this answer



























                2














                I had the some problem. From within sa2 try



                from sa2.models import Mo1, Mo2, Mo3 


                or alternatively



                from .models import Mo1, Mo2, Mo3


                CATCH: be sure to use the same imports in your forms.py, tests.py or wherever else you import those models. If you update only one of the import it will not work and you will still get the same error.



                The problem occurs because of a double import. For more information please see this : The Double Import Trap



                Good luck



                P.S. no __init__.py were hurt in the process






                share|improve this answer

























                  2












                  2








                  2







                  I had the some problem. From within sa2 try



                  from sa2.models import Mo1, Mo2, Mo3 


                  or alternatively



                  from .models import Mo1, Mo2, Mo3


                  CATCH: be sure to use the same imports in your forms.py, tests.py or wherever else you import those models. If you update only one of the import it will not work and you will still get the same error.



                  The problem occurs because of a double import. For more information please see this : The Double Import Trap



                  Good luck



                  P.S. no __init__.py were hurt in the process






                  share|improve this answer













                  I had the some problem. From within sa2 try



                  from sa2.models import Mo1, Mo2, Mo3 


                  or alternatively



                  from .models import Mo1, Mo2, Mo3


                  CATCH: be sure to use the same imports in your forms.py, tests.py or wherever else you import those models. If you update only one of the import it will not work and you will still get the same error.



                  The problem occurs because of a double import. For more information please see this : The Double Import Trap



                  Good luck



                  P.S. no __init__.py were hurt in the process







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 30 '15 at 10:34









                  DimoDimo

                  17118




                  17118























                      0














                      Remove __init __.py file in project folder. I have same error when use test in Django and then I remove it, error is disappear.






                      share|improve this answer



























                        0














                        Remove __init __.py file in project folder. I have same error when use test in Django and then I remove it, error is disappear.






                        share|improve this answer

























                          0












                          0








                          0







                          Remove __init __.py file in project folder. I have same error when use test in Django and then I remove it, error is disappear.






                          share|improve this answer













                          Remove __init __.py file in project folder. I have same error when use test in Django and then I remove it, error is disappear.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 22 at 5:19









                          tnductamtnductam

                          828




                          828



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f31579304%2fupgrading-from-django-1-6-7-to-1-8-3-runtimeerror-conflicting-models-in-applic%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                              155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해