#8747: Importing models from within `__init__.py` prevents syncdb from creating
tables
---------------------------------------------------+------------------------
          Reporter:  julien                        |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by lsaffre):

 I had probably the same problem, but less clear. I also imported models
 from the application's {{{__init__.py}}}, but the problem appeared only
 when I added another class definition (not a Model). I used {{{manage.py
 testserver}}}. It seemed that the whole application didn't get "activated"
 (also fixtures were not loaded) when this additional class definition was
 there. But no error message, not even when using {{{-v 2}}}. Also no error
 when importing these modules from a shell.
 It stopped when I moved the additional code to another module and not
 importing it in {{{__init__.py}}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8747#comment:3>
Django <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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to