#8596: Error while importing URLconf 'mysite.urls': No module named models
--------------------------------------+-------------------------------------
          Reporter:  tolano           |         Owner:  nobody
            Status:  new              |     Milestone:  1.0   
         Component:  Admin interface  |       Version:  SVN   
        Resolution:                   |      Keywords:        
             Stage:  Unreviewed       |     Has_patch:  1     
        Needs_docs:  0                |   Needs_tests:  0     
Needs_better_patch:  0                |  
--------------------------------------+-------------------------------------
Comment (by Karen Tracey <[EMAIL PROTECTED]>):

 Replying to [comment:8 tolano]:
 > The import is failing but the web should run anyway, so I think this
 patch is good enough, just to be prevented.
 >
 [[BR]]
 Note the comment directly above where the patch adds `except ImportError:
 continue` states: "Import errors here will (and should) bubble up,"  So it
 was a conscious decision to not ignore !ImportErrors there, which the
 patch reverses (without altering the comment so resulting comment and code
 are in direct contradiction).

 [[BR]]
 > In my case the problem was that there were some files in the dir that
 shouldn't be there like: models.py.~1~ and so on. After deleting those
 files the app appeared in the admin again.
 [[BR]]
 It might be nice to better understand what caused the error in your case,
 though it may be too late now.  Certainly adding a file named models.py~1~
 in one of my own app directories doesn't cause this problem.

 [[BR]]
 > IMHO the patch should be there either failing silently or raising an
 exception. In the last case, the exception must be useful and well
 documented.
 [[BR]]
 The issue of the original exception traceback getting hidden is covered by
 #7524, I believe.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8596#comment:9>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to