home / django_tickets / tickets

tickets: 8747

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
8747 2008-09-01 06:29:23 2009-05-07 14:22:10 2022-03-06 03:43:04.069180 Accepted closed Database layer (models, ORM)     dev fixed Importing models from within `__init__.py` prevents syncdb from creating tables I have a very simple app with this structure: {{{ myapp/ __init__.py models.py }}} That app wouldn't create its tables when running `syncdb`. After poking around I realised that it was because within the `__init__.py` I was importing the models: {{{ # __init__.py from models import * ... }}} So, my question: is that a case of "don't do that", and if so is that worth specifying in the documentation? It took me quite a while to debug that, and I found nothing obvious in the docs to help me (if there is, please point me to it). nobody julien   0 0 0 0 0 0
Powered by Datasette · Queries took 0.854ms