django可重用app目录

来源:互联网 发布:python 最优分箱 编辑:程序博客网 时间:2024/05/23 18:33
这个目录结构为django 1.6形式。 

mysite/
    |——manage.py
    |——mysite/
    |        |—— __init__.py
    |        |——settings.py
    |        |——urls.py
    |        |——wsgi.py
    |——polls/
    |        |—— __init__.py
    |        |——admin.py
    |        |——models.py
    |        |——static/
    |        |        |——polls/
    |        |                |——images/
    |        |                        |——background.gif
    |        |                |——style.css
    |        |——templates/
    |        |        |——polls/
    |        |                |——detail.html
    |        |                |——index.html
    |        |                |——results.html
    |        |——tests.py
    |        |——urls.py
    |        |——views.py
    |—— templates/
             |——admin/
                     |——base_site.html 

这种结构,调试app,它可以使用各种新语法,不会干扰其他app。
而且,很方便的解决static问题。

0 0