[python-chinese] 我想在app文件夹下创建app可以吗[django]

python Bian python.bian在gmail.com
星期六 八月 25 12:35:44 HKT 2007


刚刚看到
在 0.91 版, app 都是放在 apps 目录下的。不过到了 0.95 版,apps 目录不自动创建了。因此你就可以直接放在项目目录下了。


在07-8-25,python Bian <python.bian at gmail.com> 写道:
>
> 呵呵,手工创建很方便的.
>
> 在07-8-24,Neil(木野狐) <chenrong2003 at gmail.com> 写道:
> >
> > app 只是一个普通的包,我现在也都手工创建了。
> >
> > 1. 建立一个目录,里面丢一个 __init__.py
> > 2. 在 settings.py 的 INSTALLED_APPS 中添加这个目录的名称。
> >
> >
> > 在 07-8-19,limodou<limodou at gmail.com> 写道:
> > > On 8/19/07, beck917 <beck917 at gmail.com> wrote:
> > > > 为了目录下的整齐,想把所有的app都放在app文件夹下,因为我看到djangoproject的源码就是这么做的
> > > >
> > > > python manage.py startapp books
> > > >
> > > > 运行上面的命令是在项目根目录下创建books app。现在我想在app文件夹目录下创建books
> > > >
> > > > 我试过python manage.py startapp app/books报错。提示app文件名不能有/
> > > >
> > > >
> > 难道django用命令的话只能自动的在根目录创建,如果要是放在app目录下。需要手动创建,或者用命令在根目录创建完毕后自己copy到app目录吗?
> > > >
> > > 手工创建,或拷贝都可以。还可以进入app目录后,使用django-admin.py来执行。因为manage.py是在上层目录,所以有问题。
> > 不过如果manage.py可以直接创建子目录可能就更好了。可以考虑把这个要求写一个ticket报给django团队。
> > >
> > > --
> > > I like python!
> > > UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
> > > My Blog: http://www.donews.net/limodou
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese at lists.python.cn
> > > Subscribe: send subscribe to python-chinese-request at lists.python.cn
> > > Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> >
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese at lists.python.cn
> > Subscribe: send subscribe to python-chinese-request at lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request at lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20070825/9f9c4242/attachment.htm 


关于邮件列表 python-chinese 的更多信息