這是一個建造Django 專案時可參考的目錄及檔案結構,個人建議有如此的圖示會比較簡潔,

參考資料來源為Advanced tutorial: How to write reusable apps 但在這個例子中並無包括資料庫的位置,
ststic 資料夾(存放scripts,js,CSS,images),templates 資料夾存放html

mysite/
    manage.py
    mysite/
        __init__.py
        settings.py
        urls.py
        wsgi.py
    polls/
        __init__.py
        admin.py
        migrations/
            __init__.py
            0001_initial.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

 

 

文章標籤
全站熱搜
創作者介紹
創作者 stanley 的頭像
stanley

史坦利Stanley程式Maker的部落格

stanley 發表在 痞客邦 留言(0) 人氣(1)