Re: Django ORM问题

"黄毅" <[email protected]> Mon, 21 Jan 2008 08:59:23 +0800
Newsgroups gmane.comp.python.chinese
Message-ID <[email protected]>
from urus.models import YourModel
你只需要在 models 包的 __init__.py 导入projects.py 里面的 Model 名字即可。


On 1/20/08, Handle.Huang <[email protected]> wrote:
>
> 在Django中如果用 "python manage.py sqlall urus"
> 命令创建数据库脚本,但是没有效果,是否这个命令对目录结构有特殊要求,因为这里我修改了默认的结构,如果在不修改结构的情况下,要如果做?
>
>
> urus
> │  urls.py
> │  urls.pyc
> │  __init__.py
> │  __init__.pyc
> │
> ├─models
> │      projects.py
> │      __init__.py
> │      __init__.pyc
> │
> └─views
>        main.py
>        main.pyc
>        __init__.py
>        __init__.pyc_______________________________________________
> python-chinese
> Post: send [email protected]
> Subscribe: send subscribe to [email protected]
> Unsubscribe: send unsubscribe to  [email protected]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
> _______________________________________________
> python-chinese
> Post: send [email protected]
> Subscribe: send subscribe to [email protected]
> Unsubscribe: send unsubscribe to  [email protected]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese




-- 
http://codeplayer.blogspot.com/

_______________________________________________
python-chinese
Post: send [email protected]
Subscribe: send subscribe to [email protected]
Unsubscribe: send unsubscribe to  [email protected]
Detail Info: http://python.cn/mailman/listinfo/python-chinese