1
da_a 2012-08-27 19:27:01 +08:00
问题1
from django doc: project A Python package – i.e. a directory of code – that contains all the settings for an instance of Django. This would include database configuration, Django-specific options and application-specific settings. Projects vs. apps What's the difference between a project and an app? An app is a Web application that does something -- e.g., a Weblog system, a database of public records or a simple poll app. A project is a collection of configuration and apps for a particular Web site. A project can contain multiple apps. An app can be in multiple projects. 问题2 当然可以 |
2
kojp 2012-08-28 00:25:21 +08:00
我来翻译一下自己对问题一的理解吧 .
Project里面可以多个 app. 而且 , app们 .应该是共用一个 Project里面的. Settings-------是不是理解的太 肤浅了 问题二 ,我有也爱类似的疑问 .我甚至想直接 使用.原生的 sql语.句 . Orm什么的 ,虽然说很先进 ,高端 .但.对于一些小项目 .感觉太琐繁了 |
3
stackpop OP |
4
rockhead 2012-08-28 10:54:37 +08:00
Django 的ORM还是可以的; 如果你设定了memcached这类的话,它一样会吧数据存在缓存里;还是自动的;
|
5
Js 2012-08-28 11:01:10 +08:00
app旨在切分业务和复用, 比如注册/登录/登出/取回密码/重置密码就可以用一个单独的app, forum也能用一个单独的app, 需要挂一个wiki,直接找一个开源的django wiki app挂上就行
最典型的,django的contrib就是一个官方自带的app集合 |