1. 程式人生 > >django可重用app目錄

django可重用app目錄

這個目錄結構為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問題。